Couldn't you do something like make (via legislation) any item on commercial sale subject to a minimum 10 year warranty on workmanship [for military purchasers] for repair or replacement, up to a value of X% of company revenue.
When you made a lemon, surely it's then cheaper to replace with a current product than it is to go to court; and being a military supplier would be a high status indication so don't companies (any making products that aren't adjective crap) should still want to make money through creating good products?
You can't be forced to actually work with the government. So if the governmeny makes it too much of a PITA, no one will bid or they will make the contract costs incredibly high.
Actually, yeah you can. Happened in WW2. People can be drafted and stop lossed. Entire factories were taken over, wages were frozen, and product shortages happened due to military need. If people can't make a profit building military units perhaps it's time the military starts building it's own skills again.
Of course you can put many provisions in contract or law but at some point nobody will work with you because the guaranteed ability to make money from every contract is gone. It's exactly why all outsourcing projects seem to have these disastrous conditions. Without them no MSP will even apply for the bid.
When you made a lemon, surely it's then cheaper to replace with a current product than it is to go to court; and being a military supplier would be a high status indication so don't companies (any making products that aren't adjective crap) should still want to make money through creating good products?