I think markets should have its own goods availability; price fluctuation to occur monthly so humans have time to react - also with formula to calculate all transaction that occurred during that month; events (not the game events) that could affect goods prices, like wars.
Now of course I don't think other empires will always stockpile the markets - it's not like it's their duty. Due to their current incompetence they buy more than sell. And so goods on market would occasionally run out and drive up the prices, if it was indeed based on stockpile and not infinite availability.
To back this up though, I suggest private sector. However, I reckon this will destroy the game engine and render the game unplayable, not to mention the unreliability of AI players. So this is just a wild idea, and I'm not entirely confident if a concept like this could work at all.
Megacorp's branch offices give jobs to locals, and produced resources go to the megacorp. And they can decide which building to build in their branch offices.
For empire's private sector which should be represented in the corporate tab, along with the megacorp branch offices, they would be just "corp" (not mega).
These "corp" will have minds of their own in building their infrastructure; one can decide to invest, or other empire can decide to invest (sort of like in vic2 factory investments). Their infrastructure will produce jobs and in filling those jobs, resources. They will always be local to the parent empire, however instead of their products going to the empire, it will go to the internal markets.
When internal markets of all empires combined have sufficient stockpile, galactic market would form and all those stockpiles would combine into one. To prevent a single rich empire to suck out the market dry, price of low available resource should be severe. Then the "corp" would jump at the opportunity to produce those low available resources.
An empire with most colonies that also has corp on all their colonies, while producing a certain type of resource like alloy, they'd be the lead on alloy production, but with heavy demand for minerals. In that case, that parent empire can take advantage of that and sell off their own stockpile to make energy credits to buy other resources they need. If they are at war and most of those corporate refineries are disrupted, supply of alloy on market would be limited and drive up the price.
Parent empire should be able to encourage a local corp to focus manufactories on certain resource in the future, but ultimately the corp AI should go where the demand/availability of the market goes. Then the parent empire can do the transaction to buy those resources on galactic market. And if the parent empire's encouragement was to flood the market with alloy, that's just as advantageous for them as it would be for others if they are running low on alloys.
At first, prospector, energy or agricultural raw resource corp would be prolific in early game I would suspect, due to constant demand for raw resources. All corp local to an empire wouldn't have as much details, like a name. They should however have a shared one background economy, regardless of which colony they are located. So if a corp on a colony in an empire have 3 mineral mines, it would be sufficient for a corp in another colony to build a consumer goods factory or alloy refinery, with rest of surplus minerals going to the market.
Judging by how much income they made (how much surplus they have sent off to markets) should have them to look for other venues of revenue, like producing finished goods like consumer goods and alloys. If an empire's corp does not manufacture enough minerals to support some of its own manufactories, it'd start buying minerals off the market and drive up the price on it. But as long as minerals keep flowing to the market from other empire's corp, it would be okay. So like I said, corp AI should ultimately go where the demand and goods availability takes them, but with minimal control from parent empire.
For balancing, there should be one corp per colony. Wouldn't matter if megacorp branch office is on that colony, that shouldn't prevent them from propping up. Capital planet should have a corp at game start.
One corp can have 1 raw resource production, 1 finished goods production and 1 synthetic strategic resource production. Raw resources are minerals and food vs finished goods are consumer goods and alloys. For strategic resources, they would be motes, crystals, and gases. At certain pop requirement, they would unlock the ability to produce finished goods. Then at higher pop requirement, they would unlock the ability to produce strategic resource.
Since the market in this scenario is stockpile based, this would give the feel of how rare dark matter and zro truly are, since none of the corp would be able to produce synthetic versions of them, and only empires would be able to sell off their own stockpiles of them to the galactic market. But then again, there's that dependence on AI reliability for these 2 resources to be available in the market sooner rather than later...