Modern batteries can last a long while though. If you take care of it and mostly keep it between 25-75% and don't supercharge it too often. There are Teslas with more than 300K miles on the original battery.
I have a model 3 with ~80K kilometers and the battery is as good as new. 2018 model. For someone that drives 10-15K km a year there's maybe 30 years more driving on this battery (400K km).
My previous ICE car had two head gasket replacements in the 10 years I owned it. I also had to replace the entire engine. Oil changes. Brake pads/discs, CV joints... So far the EV is way ahead and based on the current battery degradation should remain ahead.
Model 3/Y battery replacement is US$15,000 to US$20,000.
Wipes out all other EV maintenance cost advantages.