Did you say that just because you felt like it or actually bothered to research it? In a petrol car, production of the car is 20% of the pollution, driving is 80% of the pollution.
An EV only takes up about 30% more to produce. With the gigafactory it will be less since the factory will produce 120% of its power in renewable energy.
There is also no rare earth in neither a lithium ion battery nor the motor. (you are confusing it for either NIMH batteries or PM motors)