I replaced a rotten plywood piece on the hitch-side of the door just as you described.
I just removed all the rotten wood and stuffed in a piece of solid wood the correct thickness and screwed it in place.
Then I painted with several coats of primer and some white glossy outdoor
paint.
I don't know if this was the correct thing to do or not, but it seems more secure than the original plywood was even before it rotted.