I’m sorry but I’m too lazy to dig up links to back up my claim. But you are correct in that electric vehicles pollute far more being produced than combustion engine cars, however the electric vehicles gain that back over it’s lifetime if your charge from mostly non-fossil sources. The figures I have read says that over the lifetime of a car, electrics output 70% less CO2 than combustion cars, and that includes the production of each of the cars.
Interestingly the watermelon (and other plants) don’t quite eat the sunlight, but the chlorophyll in the plant uses the sunlight to get enough energy to steal the carbon atoms from the CO2 in the air. So your water melon is literally made out of thin air!