Yea but the smog is moved outside the city where much fewer people live. If everyone had an unregulated gasoline engine on these streets, NYC would look like Beijing
There’s also the lithium mining step (for the batteries).