That's probably true if you only look at the cars themselves, but don't forget that getting petrol in cars requires a huge petrochemical industry, from oil wells to refineries, pipelines and pumping stations. Each of those steps also emits all kinds of crap. The same is true for electricity from many sources, but overall I suspect EVs come out somewhat better than petrol cars.
Of course, cars are generally too big, too heavy, and too fast. Addressing those issues would benefit everyone, regardless of fuel source.