I have repowered several machines with used engines with good luck. That shaft size you mention is probably the standard from what I have seen. It is extremely common so that works in your favor of finding a replacement. Going up in size a few HP is a good idea as well.
Most engines will just bolt right up and plug right in. My biggest concern would be if this engine uses an assist pump such as in situations where the fuel tank sits low like under the seat. Make sure you get one setup like this from the start. Many are gravity fed with the tank above the engine.
I have swapped between brands and sizes many times and there is somewhat of a universal fit. Finding engines in the size you want is easy. I know from personal experience that the larger ones around 25HP are hard to come by for a decent price. You might end up getting an entire machine with a good engine for scrap price as I have done in the past.
I seem to have come across a lot of the Kohler Command CV16 engines around here. These are from like 1998 or 2000 and seem to be great engines. The Courage leaves a lot to be desired if you want my opinion. I bet you would fall in love with a 16HP Command if you can find one as they are tough little motors. I run a Rotella T6 synthetic 5W40 in all mine. This will clean up the hydraulic lifters and rings nicely if they are sticky as they seem to be when they come my way.