This is why I bought my E36 M3 from a local reputable dealer who wouldn't even touch a car with a problem and went over all the CPO inspections, etc... I paid $29k for a 99 M3 w/44k mi on it and 100k mi warranty but 0 problems, new brakes, new tires, and they've treated me like gold and been very very happy with my no hassle purchase. Sometimes you pay more but you get a better deal when dealing with reputable business's, that and they have something to sue their asses off for in the end
I've bought a bunch of used cars from private people in my time without a too major problem but in general they all have problems, it's rare to get a trouble free used car.