With companies like Tesla... they are the D-Link of vehicles.
They absolutely don't want long term stable good cars. They want you at the 4-5 year mark to buy a new one. And given the company has harassed engineers poking at under the hood, they will highly likely damage your car via remote disables or other 'trickery'.
I don't trust anything that Musk puts his hands on. There's a good reason for that.
You can dislike Musk all you want, but it doesn't change reality.
In some cases you can even upgrade the hardware (e.g. the AP and MCU) with the latest shipping parts to keep your model fresh. This is not universally true - there is some drama over a promised Model S MCU upgrade which a lot of people want only apparently only a handful of owners have gotten, but overall the approach is very refreshing.
(Although this is improving with time and may be as low as 56kgCO2/kWhcapacity).
So a 50kWh Model 3 has about 5.5mT of emissions from its battery. The rest of it may have lower emissions than a conventional car (since there's no engine, exhaust, fuel tank, etc), but pessimistically we can just assume that the difference in manufacturing emissions between EV and standard is just the battery.
Over a 175,000 mile lifetime, a 35mpg gas car will emit 45.4 tonnes of CO2. And a Model 3 (4.1kWh/mile) will emit about 8.5 tonnes with Californian electricity or 17 tonnes with US average grid electricity. In either case, the vast majority of emissions is in the actual energy to fill up the vehicle, not the battery, and electric cars are FAR better (even with a >200 mile range battery which is considered very large in much of the literature) in this respect.
A factor of 3.2 times better in California (including the battery) and still a respectable factor of 2 times better in the US with current electricity mix. But of course, if you buy the EV now and it lasts 10-15 years (including secondary and tertiary owners), the US and Californian electric grid will be much better as coal (and later natural gas) is phased out.