This is not about Tesla, but as a rule of thumb, do NOT buy an old, out of warranty luxury car that was expensive (say 80+k) when new but now only cost 20 something k. The sweet spot for used luxury cars is 3-6 years old, in terms of price, features, and cost of maintenance/repairs.
I assume you generally keep you cars for a long time. If you were to buy a new car for say 27k, I presume you will keep it for many years so your per year cost is pretty low. However if you buy that old luxury car for 27k, you WILL need to fix something major over your ownership period (probably multiple things). This will increase with age and mileage. The fact is you may end up spending as much, maybe more on the car than if you bought a 3 year old car after adding in the cost of repairs. You most definitely won't be able to drive the car for another 10 years, unlike a new 27k car.