Richard, I bought a 172M about 16 months ago, so I've recently gone through the same exercise you're doing now. Before I bought, I read that you should plan on 10% of the purchase price in unexpected maintenance the first year, and In my case that was just about right.
No prebuy is going to catch everything as far as I'm concerned.
You have some control over how much the "oops" items cost. If you've got a basic VFR bird, the surprises shouldn't be too much unless there is major corrosion or missed ADs, etc. (which a prebuy should catch). If you get into replacing avionics, that can be painful. If you're going for your IFR rating, I would strongly encourage you to buy a plane already IFR equipped to your liking - it is much more expensive to upgrade.
I agree with Royson that you can't financially justify ownership. But, there are 2 factors to consider strongly:
1. If you want to go anywhere for recreation, renting is a pain both in terms of scheduling for consecutive days, and also paying for non-flying days. If you rent for a weekend trip, you can easily double the cost of the rental just in minimum daily charges.
2. If you fly IFR much at all, you will quickly tire of playing the game "guess which avionics are broken or have expired databases on the rental today?"