Yes. Training a cat to take medicine can start before illness. AAHA/AAFP notes that cats can develop voluntary tolerance for handling and medication when young, and that a soft-treat rehearsal of taking a pill can be taught when no real medicine is needed.
Tolerance for touch around the mouth
Touch around the mouth is a separate step from hiding an empty piece in a treat.
Getting used to liquid-medicine tools
A liquid-medicine tool can also be shown when no real medicine is needed.
The risk of mixing medicated food into the main meal
Mixing the medicine into the main meal ties that meal to the medicine.
Bitter medicines and food aversion
A bitter medicine can lead the cat to avoid that food.
Asking the veterinarian for another formulation
If dosing cannot be kept up, another formulation can be asked of the veterinarian.
How forced dosing affects the relationship
Forced dosing can make later handling steps harder.