Factories have big flat roofs. That means low installation cost for solar panels. And these are nowadays pretty efficient. Not perfect angle or random shadow aren’t business or show stoppers now. Especially in a sunny country.
Even if you cover a factory's whole roof with solar panels, it can't generate enough electricity to run during working hours. Manufacturing takes ridiculous amounts of energy.
Depends on what are you manufacturing. 200 watts from square meter roof is doable. 3x3 meter is about right space for a single machine with all the enclosures, tables, etc (in Europe). The average sized machines can be used with single phase allowing 3,6 kW power consumption. Half of it comes from solar panels. Halving power consumption is good imho. This math does not work for steel factory. The math is
much better for assembly line type plant where only power tools <1 kW are used.
There's no reason you can't power solar panel factories with solar panels (once you've bootstrapped the process of course, but that applies to any power source).