So it turns out the economy is broken and exploitable.
I assumed when you ran out of minerals, your alloy forges couldn't produce any alloy. That makes sense, right? You put minerals in, you get alloys out. But that's wrong - alloy forges magically produce alloy from nothing, and the minerals are just upkeep for the building.
See it turns out if you run out of minerals - the penalty is just 50% reduction in alloy (and consumer good) output. So, you can see where this is going - just build tons of alloy forges and they will run at 50% with no input, magically generating high price alloys for you from nothing. But it gets better, because the 50% penalty is additive - so let's say you manage to get +50% production, it would only effectively be a 33% penalty. The higher your production bonus, the lower the penalty.
But wait - it gets better! All you have to do is buy 100 minerals on the market at the end of every month, and the game won't realize you've run out, and your alloy foundries will run at 100% capacity off those 100 minerals no matter how many you have. Which means minerals and mines are optional. You never, ever need to build a single mine - or anything except alloy foundries. Carpet every planet with them, dump the high price alloys on the market and buy all the food you need. If you need to make buildings, pause - buy minerals - spend minerals.
I can't actually take credit for this idea - I actually considered it, but I thought there's no way the system could possibly be that stupid so I never tested it. But I read about it on a forum somewhere and sure enough, it really is that stupid. I'm not even 100% sure this is an exploit, since every part of the system is working as intended. It's just really poorly designed.