It's not hard to imagine them planning ahead. In fact you can argue that the parent company ByteDance has planned for such existential risk by setting up TikTok as a separate entity from Douyin.
That of course was the case. Mega corporations are as powerful as small sovereign nations, they have to behave like one...