The Ming did flee to Formosa IOTL.
They lasted there for years (1661 - 1683) until a Qing expedition brought the island to heel.
EDIT: Apparently the Qing expedition was sent out after the Ming remnants fell into a succession crisis that led to a civil war. Perhaps we can ask what would have happened if the Ming remnants had a clear succession.
But the succession
was fairly clear. After the Chongzhen Emperor died, the succession would pass to his sons in order of age. But those three sons weren't present (we're not sure what happened to them), so the succession should fall on his nephews (but there weren't any), and then to his cousins. The most senior cousin would be the Prince of Fu, Zhu Yousong, who historically did become the Southern Ming claimant as the Hongguang Emperor. Even the most famous official of the Southern Ming, Shi Kefa, recognized that the Prince of Fu had the most valid claim due to his bloodline, even if the prince did have a thoroughly irresolute character. By contrast, the claims of the Longwu Emperor (who first gave a noble title to Zheng Chenggong) are ridiculously distant, and are positively absurd when you look at the number of princes who are of much closer relation to the last Emperor.
The terrible leadership of the Hongguang Emperor was actually what persuaded the Southern Ming officials to get rid of the official line of succession and find a worthy prince to become Emperor. So if you want a Southern Ming under a worthier candidate, you'd need a more flexible and
less clear line of succession, one that allows the enthronement of the most meritorious prince and not the most senior. Also, competence or not, there's no legal argument that allows skipping over the Crown Prince in favor of some other candidate. The issues of identification and location are more important than the actual line of succession. So if the Crown Prince is located, there will be zero succession issues.
Note, there's also the issue of identification. After the fall of Beijing, there was one person who were executed by the Hongguang government for claiming to be the last Emperor's son. We're not sure if he was lying or not.