Hmm - I don't see why production costs would be covered by monthly upkeep. Monthly upkeep to me is, well, the cost per month to maintain the industry. Replace broken machinery, pay base wages, do market research and advertising etc etc. After all, no industry is going to operate at constant production volume - thats a simplification that so many games use that people consider it 'realistic', when its anything but. There might be some stockpile built up, but if the buy orders stop, then so will production.
It would produce whatever it could sell as determined by accessibility, market share and market volume, with the profit you get from the industry equaling (quantity sold) * (sell price - production cost) - shipping costs (accessibility).
I agree with you that, from a "realism" perspective, the player should get some discount - as the owner, they should be able to get things at production cost rather than sell cost (those two could be quite close in a competitive market) . But that violates a fundamental tenant of Starsector game design by encouraging boring, safe trade, and gameplay must trump "realism"