It's completely self proclaimed, but I'm a battery guy and electronics and automotive repair type of guy. Right down to rebuilding my gen 2 Prius battery that now has about 300,000 miles (482,000 km) on it, including when the original battery failed.
You should worry about both of those things if you're buying used.
Prius batteries last so long because they keep a pretty narrow charge\discharge range, despite the total batteries capacity.
But beyond that, the EV batteries in almost all the fully electric vehicles on the road don't have a km used until failure issue. They have an age issue. Lithium batteries have a shelf life, so to speak. It doesn't matter if the battery has 30,000 km on it or 300,000 km. None of them will last beyond 20 years before they start going bad and there's nothing you can do about it.
That being said, LifePO4 are absolutely the most chemically stable and long lasting lithium based battery currently in any EV's. if you're in the market for an older EV with a lithium battery, either plan on replacing the entire battery at some point (check how much it may cost you. Ranges from $6,000 to over $25,000 in some cases) or at least find one that uses LifePO4 as the battery.
Jury is still out on the semi solid state or solid state batteries. Sodium based batteries "should" outlast the vehicle they're in, but there aren't many in production outside of China yet and they aren't as energy dense so will typically be in shorter ranged vehicles.
It totally sucks that everything is littered with hard to get to and expensive to replace electronics they all use. It will be a pain trying to have a classic ev in the future when caps start leaking everywhere and you can't find replacement necessary to function touchscreens.