Function is not nearly the only problem. Another problem is the battery elements are equally or even more dangerous to produce than fossil fuels. That's another problem.
https://youmatter.world/en/are-electric-cars-eco-friendly-and-zero-emission-vehicles-26440/
Why is this? Because electric cars store energy in large batteries (the larger they are, the bigger their range is) that have high environmental costs. This happens because these batteries are made of rare earth elements (REE) like lithium, nickel, cobalt or graphite that only exist beneath the surface of the Earth and therefore depend on mining activities with very polluting processes. That’s why asking whether electric cars are greener or not does come with an easy answer.
For instance, to produce 1 ton of REE, 75 tons of acid waste (that isn’t always handled in the right way) and 1 tone of radioactive residues are also made, according to the Chinese Society of Rare Earths. In spite of these pollution issues, research tells us not to worry about the availability of these rare earth elements and when it comes to lithium, there is data estimating enough worldwide reserves for the next 185 years, even if the EC market triples, according to the Deutsche Bank. As for cobalt, graphite, and nickel, they also seem to be in a comfortable situation, since the demand for the years to come is expected to stay far away from the reserves Earth has to offer. Although it looks like everything will work out just fine, let’s not forget the negative environmental impact of extracting REEs.
Apart from the weight of the REE, the energy used to produce the batteries themselves is also responsible for nearly half of their environmental impact since most of this energy doesn’t come from low carbon sources. Nevertheless, forecasts show that the electricity generation is improving and there are more renewable sources entering the grid, which would help decrease the ecological footprint of building up these batteries.
On the other hand, developing renewable energy systems has its impact as well, again using energy and REE. In the end, we should be reasonable about this and despite their initial footprint, the impact of lithium-ion batteries, when compared to conventional cars, is offset within 6 to 16 months of average driving (using clean energy) in the US or 2 years in the EU. From this moment on, EC keep being a better eco-alternative to conventional cars until their battery gets to the end of its life cycle. But what happens next? How are lithium-ion batteries being handled when they’re no longer useful for electric cars?
Disclaimer: I work in big oil, as an IT geek, but still...