Presume this is a bug, I had a metal factory on a rock, wasn't in a planet zone though. There were loads of enemies in that zone but they weren't taking out my factory. The bug part is that one of their ships looked like it was stuck close to the rock with the factory on it and every few seconds it would spawn a new ship which would join the growing fleet size of the enemy.
So first of all, why did it keep spawning a new ship from the ship close to the rock, secondly why didn't it destroy the factory. I could live with it's stupidity of not destroying the factory, afterall it's not going to make a massive difference, but to constantly spawn a ship from another ship every few seconds is cheating, unless there's a feature I don't know about.