Sure, that would work. And would be the way to go depending how much rot. Minwax Wood Hardener is good to use to make sure any fungus present is dead.
But the Minwax product is very low viscosity and on my boat soaked into the rot thoroughly, and hardened. This gave a surface to apply the two part Marine Tex which will never rot.
This patch has been there for 8 years in Florida with no deterioration. Plus the screws are more secure than with wood.
To cope with a similar situation, I first used a Min-Wax Wood Hardener, which soaks into wood, especially rotten wood. It is a very low viscosity single part epoxy. After it cured, using Marine Tex two part expoxy, I made surfaces to replace what had been there. One thin (1/8 inch) layer at a time. No doubt there are variations that would also work fine.