The batteries with long warranty have a limited mileage warranty. To my knowledge, only Hyundai have a 5 year unlimited warranty on them.
Interestingly, I had to buy a new battery for one of my daughters cars the other day (2015 Ford Focus) and the one I bought from the AA has a 5 year warranty. No upper mileage limit but a minimum requirement of 1,500 miles a year.
As for EV batteries, they will have to last the entire life of the car (or drop massively in cost) for this not to be a major stumbling point in the second hand EV market IMHO. Nobody who buys an older second hand car wants a potential bill of thousands of pounds, especially if the bill is more than the car is worth. In that scenario they would be better off scrapping the car and starting again. With EV’s still being fairly new we haven’t really come up against this problem yet, but it will need resolving quickly. I’m sure that, over time, battery life will improve and replacement costs will fall drastically and this current dilemma will be resolved.
Anyway, this wasn’t meant to be yet another EV thread as there’s no shortage of those already on this forum!