There's plenty of data now from Nissan, Tesla and others showing that 10 year old EVs still often have at least 80% of their original battery capacity. Needing to replace the battery is not a given.
Right now, looking at buying a used EV, I am more scared that the battery or electrics fail for some reason than I am of their gradual degradation over time.
I don't know how likely that is, but it's putting me off anything other than manufacturer approved used with a solid warranty.
I should mention the Dr. Prius app, which is not limited to the Prius. The Dr. Prius website lists ODB2 readers that are able to access the battery data. Some single-board ODB2 readers can't.