There's a provision for this. TLD operators have to upload all registry data to an escrow service. If the TLD operator goes out of business or turns out to be technically incapable of running the registry, ICANN can access this data and transfer the domain to another registry. ICANN has contracts with several registry operators to take over in case of an emergency like this.
https://icannwiki.org/Data_Escrow
https://icannwiki.org/Emergency_Back-End_Registry_Operator