calculating the total power needed by factory
If you just add up the rating plate values for every piece of equipment in the building, you will end up with a figure that far exceeds what you actually use.  That's because you haven't allowed for "diversity".  In practice, nobody turns every bit of equipment on at the same time, nor is everything running at full power all the time.

You would be better off buying a clamp meter, and clamping it around each of the phases running into your current building in turn, to see what you actually use.  Then add a bit of safety margin on top.