Frankly, I think bumping the mass of shipyards and factories is something that should be done regardless. And shipyard construction speed needs to be nerfed significantly. And yes, increasing the size of the ship will generally negate most benefits of the station. Except size, of course. And the bigger it is, the slower it is. And therefore a bigger target. Of course, it can just jump out and be safe. Then again, a Station can be invulnerable.
How about we nerf the factories. Or more specifically, we have Capital Factories (CF) and Station Factories (SF). But CF would be incapable of producing certain items, like shipyard blocks and factory blocks. Maybe add shops and faction blocks to that. I'm sure we can make a decent list here. But if you want to increase your factory or shipyard production, you need to find or build a Station.
Maybe even make shipyard versions (CS / SS), but I'm not sure how you would limit a shipyard on a ship. I'm not sure what blocks I would leave out without pissing everyone off and power or speed nerfs seem pretty pointless considering size issues. Tho, definitely one per ship. Stations shouldn't have that limit.
Also, CS and CF would require you to 'power down' before they can re/moved or added to. Kind of like a reboot, but more so. It doesn't have to be long to take effect, but it remains in effect until you 'power up' and your energy reserved are purged in the process. No shields, of course. So making changes to your Capital facilities isn't something you would do lightly. A problem Stations don't have because of their inherent stability.
All this means you can't just pick up your CF and plop it on a planet to turn it into an SF and crank out some more facilities. Even if you keep a spare SF in your pocket, your still going to be vulnerable during the actual refit.
While shops should require cargo space, I don't think those should be limited beyond that on ships. Traveling salesmen and merchants are a thing. The shop is basically just a trade interface. You could probably just remove the block from the game entirely and move the interface into a menu somewhere. Maybe.
Let's not forget that ships don't produce faction points. I think I read somewhere that Capitals will actually
cost faction points. I don't remember if this was a reoccurring charge or not. If it's not, maybe it should be.
On a slightly different topic, I think shipyards on ships would be a good solution to the minelayer question. But really, does it have to be a Capital? The mine itself isn't even a full 3^3. Six warheads and a core, dropped out the back. That's a
really small shipyard.
--- brain dump complete ---
or not
PS: Anyway, the problem is to encourage station building. Not to nerf mobile shipyards.