Should be a rule that when this happens and these companies fold that everything is open sourced - at least we'd all get something out of it.
The biggest blocker there is probably whatever remaining creditors to the company when it goes under then have claims on remaining assets like the software.
One solution would be putting something in the tax code such that donating the code to an open source foundation gives a bigger benefit than simply writing it off as a total loss and destroying it.
Totally impossible. Closed source software often contains IP licensed from other entities. Just because a company folds doesn't mean they can violate licensing agreements.