Been there, done that.
Start with a hammer and well sharpened chisel and remove all rotten wood. Use a Dremel in some areas just like you were drilling a cavity in a tooth. Don't worry about leaving a flat surface, just get all the soft wood out.
Saturate the wood with west system epoxy thinned to milk consistency with MEK.
Flatten the substrate with epoxy thickened with wood dust, fairing compound, whatever, leaving slightly more depth than the thickness of whatever you are going over the repair. So, of it is 3/8", make the depth 13/32". When this is starting to thicken, press flat with a small piece of wood wrapped in wax paper.
Tape construction paper over the repair area, and with a razor knife cut out the paper by tracing the edges, then use this to cut your repair. Coat this on the backside with thickened epoxy and press onto place. Coat the edges so any gap is filled. Don't worry about clean edges, you can cut these down with a head gun and a scraper.
.
You can get fancy with the repair piece of you want, orienting grains, etc.