Like all mechanical repairs, it depends on who done the work and the quality of parts used. How the owner "breaks it in" is just as important. I'd prefer a good mechanics rebuild unit over a factory exchange unit because he has done the job from start to finish and would be more likely to find any underlying cause(s) for the unit to have failed. Sometimes a tear down and inspection of the failed components can be the only way to make sure it doesn't happen again. For example, lean, rich, or preignition conditions can be identified by inspecting the pistons and may identify fuel mixture or ignition timing problems. Restricted coolant flow or poor lubrication can also be identified and corrected. If the unit was replaced because the compression was low or the engine was siezed, without a tear down to identify the cause, the replacement unit may fail prematurely also, since the most likely cause would be external to the powerhead. Find out who done the repair and call them. Most will be glad to answer any questions. Any remaining warranty on the unit at the time of purchase would also influence my decision.
Even with every precaution one can take, it's still a used engine and anything can happen. A long boat ride, a good inspection, and maintenance records may save you a bunch of money down the road, or river.