@DW Very true but with the increased complexity of ICE for emissions then there is a lot more to the engine than just the block/heads/rotating assembly.
My Ford Ranger 3.2 hydrolocked at 70k (4rys old) when the egr cooler fractured and it sent the coolant into the inlet manifold. CATs fail, oil changes every 8-12k etc.
Whereas I now have 2 EV's, both "old" (2014 (60k miles) & 2017 (100k) and show negligible battery deg. I think it's part of the same study as @jcamp posted about, but there was one that showed you could replace the battery completely and still be better off in terms of whole life. The batteries are also recycled, there is a huge market for old EV batteries in large scale home storage as the battery isn't dead, but just not "good enough" to use in a car.
The killer comes when you compare WHERE the electricity comes from, now here in the UK around 40% and rising is from wind and solar, some from nuclear and the rest is LNG, the coal power stations were turned off this year I believe. I also have a large solar array at home so 70% of the year I can run at least one car for free and would be wasted or uncaptured energy otherwise.
Whereas, if you are live in a State where 90% of the power comes from coal burning, then it's most likely worse than an ICE in terms of emissions.