And even if it is $10k, plus another $10k for a new battery, and from at least a drive train perspective that's practically a new Tesla for $20k that'll last another 100,000+mi.
I certainly would think twice about an old car with over 100k on the clock for $20k. There are plenty of other components besides the drivetrain that can go south on you and are expensive to fix relative to the value of the car. Some ICE cars are notorious for the drivetrain going 350k+ miles while the rest of it might rot apart. Honestly modern cars are terrible to drive when they are old. My old 20 year old honda had a leaky sunroof, leaky tail light seals, slow window motors that cut out in the cold winter, every hydraulic line corroded and leaked at one point or another sometimes multiple times, frame rust, shot rubber in the suspension components, shot brake system, rubber and plastic body trim that was just cracking and sloughing off from 20 years of UV bombardment, blown speakers, and a motorized radio antenna that never once worked. The drivetrain on the other hand was flawless being a honda, just needed an oil change with synthetic once a year ($35 or so and 15 minutes of my time mostly passive waiting for it to drain) and it was still on the original clutch.
With a tesla you still have suspension components with rubber. You still have rubber gaskets and seals around windows and doors. You still have hydraulic brake lines. You still have steel components that will rust. You still have electric motors controlling things like windows (and presumably the sexy door handle release) that probably have plastic gearboxes. You aren't out of the woods, far from it.
But that's why I don't understand why you seem to assume a Tesla needing a new battery and a worn out interior/exterior/suspension is going to be $10k. Where's the data? Do you actually have listings of Teslas with dead batteries for $10k?
It's a bit like the fact that there is a ton of Iphone8's available, pop a new battery in them and you're still good to go: https://www.gumtree.com.au/s-iphone/iphone+8/k0c18597r10?cat...