The harm of electronic factory is mainly that the flux volatilized during welding comes into contact with lead-containing solder.
However, the volatilization of electronic boards is limited. Now there are generally exhaust devices, and the smoke emitted is absorbed immediately, and the current solders are lead-free. So overall, the harm is not too great.
Painting is different. Some workpieces are very large, even if there is exhaust equipment, it is all the equipment in the factory, and people will inhale a lot.