For the pre-buy I would have a full annual inspection done on the aircraft. I tell the seller that I will put down the agreed upon asking price, and anything that is found during the pre-buy/annual inspection comes off the asking price of the airplane.
I absolutely agree that this is the way to go. I would add and important emphasis though. No seller in his right mind would agree to open endly "pay for anything that is found wrong" in an annual/prebuy, because an awful lot can be found if one digs deep enough (and usually is). There are all sorts of things that are "wrong" that don't affect the legal airworthiness of the airplane.
A more appropriate agreement is that the seller will pay for anything that is found that causes the aircraft to "fail" the annual, or in other words, causes the aircraft to be "Unairworthy".
There's still room for controversy here, with things like low compressions etc, that may not technically cause the airplane to fail the annual, but are still of concern, but this is a reasonable starting point that any honest seller ought to be able to agree to.