You simply set aside money in an endowment fund (or other funding apparatus) and create a legal entity charged with the task of using the money in the fund to continue operations in the event the main company shuts down. Just add a clause in the legal framework of the organization which provides for the startup and handover operations, put individuals on a "board" of some sort who will begin drawing a salary when the organization is kicked into action, etc. It's not exactly rocket science.
The fact that so many companies who "plan to be around forever" haven't bothered to even think about these sorts of things indicates to me how fundamentally unseriously they take their own business.