I don't believe they are equal in pollution in the manufacturing of them. For starters, batteries can't be recycled at a certain point, whereas steel is steel, aluminum, aluminum.
The reason batteries and solar panels are built in China is China uses cheap coal and labor. Unless you have a different argument?
I am no saint. So don't get me wrong. I drive an RAV4. I need it to take my elderly mother and grandkids around. Still, I believe it pollutes less than a Rivian, when all the fossil fuel uses are factored in.
I have yet to see conclusive statistics on these issues. I look at CO2 measurements globally and there is simply no evidence that EVs are providing any benefits to the environment.