Still depends on budget. Some people will prefer to spend more up front to increase the odds of more time till an expensive repair, or to get XYZ technology that came after a certain model year redesign, like more air bags, traction control, backup camera, or an infotainment center or whatever, BUT these are all things that can break and increase repair costs, as can many other technologies like electric steering, electric water pump, adaptive suspension, power lift gates, etc., especially if it is the first couple model years this new tech was deployed so they don't have all the bugs worked out yet.
If you're paying someone else to fix it, I draw the line at 150K mi, "maybe" 200K if both the engine and tranny are bulletproof, not even having upper intake manifold gasket issues, providing the timing chain (or even more so the belt if so equipped) has been changed in the last few dozen thousand miles. Depends on the vehicle, some timing chains last past 200K. If you check out multiple specimens of the same model, same engine, you will get an idea what sounds noisy like there's more wear, except anyone can just put thicker oil in to quiet a car down for a sale.
# years, depends on rust level and how warped interior plastic, how grayed exterior trim, how brittle the headliner foam, etc, anything that wears from light, water, oxygen regardless of mileage. I'd go for an older vehicle "beater" over 14 years old if it's 1 owner, garage kept, low mileage, especially if they're getting rid of it for certain reasons such as death in the family (more cars than drivers), too old (bad eyesight/health/etc) to keep driving, or want something smaller if gas prices recently rose a lot, but less this last reason because if they're driving that much, it's going to have a lot of miles on it or else that was just an excuse/lie. You can assume the seller will tell you the best reason they can come up with, assuming a private sale - I would never pay the premium to get a beater from a dealer.
I especially don't like buying from someone middle aged or younger who is scruffy looking and just seems to need the cash, as this probably means they lacked cash and concern for maintenance and repairs too. I also don't like buying from someone who hasn't owned it long. If a car is 10+ years old it wouldn't necessarily be unusual for there to be more than one owner but if the seller has only had it for a year or less, something is up with that.
In other words you don't want to be near one or more expected $1K+ repairs, might as well put that money towards something a year newer and have everything a year newer, and average mileage that much less too, but again it depends on budget and finding a cherry rather than taking on someone's problem that caused them to sell it.
You could make a short-medium sized list and research those vehicles, which engines in each are more prone to issues, transmissions too, and at about what mileage. Some like Honda, seem like reliable vehicles yet you still may end up with a $2000+ transmission bill sooner than later on something old enough to be a beater, unless it's a manual tranny. As above if you get your heart set on a Honda I would sooner spend $2k more for something newer with fewer miles.
Then there is that true-beater buyer, who wants to spend under $2k and that might suit your purposes to drive a mile at a time because you're putting so few miles on it that even if it has a major repair needed in the next 10K miles, it might be several years before you put 10K mi. on it... at 5 miles/day that's over 5 years, and if the vehicle is very low value (paid in cash not a loan) then you don't need to carry comprehensive insurance on it, saving even more. I just wouldn't drive a long distance in a vehicle depreciated that low, like not further than the cash in my pocket (or a credit card) could reasonably pay for a tow.
Ultimately if you're going to pay a mechanic to repair it, the lowest total cost of ownership is going to be with the most mechanically simple sedan you can find, with a non-turbo, I4 engine, and manual or traditional auto tranny, not CVT. Unfortunately many vehicles in recent years don't even have a tranny fluid dipstick so you can't check the fluid condition without invasive procedures - maybe a mechanic will do it if you pay for an inspection for a vehicle valuable enough to spend money on that.
Then again you should still LIKE the vehicle. Life is too short to drive every day in something you hate. The last angle I can think of is that this is a child transport, so a good crash test rating but especially being larger is safer in a real world vehicle-vehicle accident.