If Thomas Cook were to go bust in July, the CAA would have a big job to source enough aircraft to bring everyone home to the UK
That said, it is quite rare for companies to go bust when they see strong positive cashflow (eg holiday companies in peak holiday season). Any creditors will want to wait for the moment when they get the highest proportion of their money back - for TC this means late September / early October. As long as TC management can put together a plan and gain the support of lenders / creditors by early September, they should be absolutely fine - there is about 4 months to do this, so allows ample time for any negotiations