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.
I don't know how likely that is, but it's putting me off anything other than manufacturer approved used with a solid warranty.