I have repaired lots of rotted exterior trim. Where I could I cut away the rot and replaced it with rot resistant wood. Also use Epoxy and Bondo. Use the waterproof type.
Before you replace anything, soak the area thoroughly with a wood hardener type of epoxy. The stuff is thinner that water and will soak in far past what you think is sound. It may encapsulate any remaining rot or fungi and keep the water away, letting it die of thirst. I also drill into the wood and install Bor-8 Rods. If water finds its way in they will disolve and treat the wood from the inside out with borate. I might even soak everything with BoraCare. I keep some on had for such jobs.
I am about to replace a front door for my son's girl friend and have bought Bor8 rods for the job. Tried to tell her to buy a rot resistant frame, but she did not listen.