The main enemy of cars is rust, but for that there are cost effective mitigations now. The real reason people ditch cars is always they get tired of the old car and want something more modern, not because the car is at the end of its "useful life".
Batteries are not like that. They actually have a useful life that degrades over time, which makes them non-servicable.
What I would like to see is serviceable batteries, where you can replace individual damaged cells and keep the battery going. Everyone would benefit from that, especially the used EV market, which would help stem the massive depreciation hits EV buyers are facing now.
I’m still driving a 26-year old Nissan Micra – though it’s now on its last legs: the Irish climate isn’t kind to steel and we’ve had to have the under-carriage re-welded three times in the past five years. :(
But let's go back to the original point, about being able to UPGRADE (not repair/replace) battery in the car. 20 years old car is worth like $1k-2k, which is fraction of the cost of the new battery.
While it's cool thing to do for hobbyists, it makes 0 economical sense.
What an old car is worth depends on many factors, but age is not the most important one. The average age of passenger cars on the road in the U.S. is 14 years old -- I think 14.5 years now. I don't think we have data on average appraised value of passenger cars on the road, but I would guess it would be in the range of 10-15K.