Can you replace the timing gears with the engine in the car? Thanks in advance for your feedback.
Cam gear yes.
Crank gear no. Pan needs to be removed
The crank gear could be replaced but you would need to take out all the pan bolts and raise the front of the engine. It would also be very difficult to seal from oil leaks if you raise the engine. Also hard to align the engine and transmission. Personally I would just replace the cam gear if the crank gear is in reasonable good condition, but if I were to replace the crank gear, I would pull the engine.
The Ford Service manual shows the method that N. Kling describes to remove the crank gear. But unless the gear is badly worn I would just replace the cam gear.
If you have a concern about wear install a new timing gear and see if the clearance is within accepted limits. It might turn out that the cam gear is all that's needed to be replaced.