I look at shipyards on ships as a thing that should happen, but with a couple limits that would keep them from becoming op.
(1) Limit the max size of construction.
I think that things like mines, torps, and drones is a must, but maybe allow up to small fighters/shuttles. No "My 3km mothership...