For the second time in less than a decade, Thomas Cook is staring into the abyss, facing the prospect of its 178-year history coming to an ignominious close.

Just three weeks ago, the tour operator looked to have secured a £900m rescue package – half provided by Chinese tourism business Fosun, the rest by a mixture of banks and hedge funds. The debt-for-equity swap would wipe out of £1.7bn of loans, allowing the company to make its interest payments during the barren winter, when less cash comes in because bookings are low.

Then, in what one person familiar with the talks described as a bolt from the blue, came a shock demand from its banks, state-owned RBS chief among them. Thomas Cook must find an extra £200m, they said, or the restructuring could not go ahead. The company sometimes credited with inventing modern tourism must, by this weekend, somehow cobble the money together if it is to survive.

“The concerning thing is that September should be the best point of the year for the cash balance,” said Alex Brignall, travel and leisure analyst at City stockbroker Redburn. “So for banks to be demanding a cash top-up now suggests demand has taken a big hit from all the negative publicity, and that the company is facing additional working capital stress.”

Lenders were due to hold a crunch meeting on Friday to decide whether the restructuring could go ahead. But well-placed sources say that if new funding isn’t secured by the end of this weekend, the process won’t get that far – directors will declare the company insolvent.

The clock is ticking on the future of 20,000 staff and 550 shops that would be left empty if it folds. The more immediate concern is the estimated 150,000 UK customers who are currently overseas and could be marooned if the worst should happen.

Bringing them home if Thomas Cook collapses – and reimbursing holidaymakers for future bookings – could cost as much as £600m. Some of the cost would be met by the industry-funded Atol scheme, a safety net that covers package holidays. Much of it, including bringing flight-only customers back, would be on the taxpayer. The repatriation effort would be gargantuan, involving the transport of almost half of the number of troops evacuated from Dunkirk during the second world war. There is a reason that the codename given to a contingency plan drawn up by the Civil Aviation Authority is Operation Matterhorn – a peak that was once notoriously difficult to scale.

Trade unions including Unite and transport workers’ union TSSA have demanded that the government step in, with the desperation heightened by reports that Thomas Cook has run out of private funding options. The airline pilots’ union, Balpa, called on ministers to ensure that RBS, still majority state-owned, withdraws its demands. “It is appalling that banks that owe their very existence to handouts from the British taxpayer show no allegiance to a great British company, Thomas Cook, when it needs help,” said Brian Strutton, Balpa’s general secretary.

Facebook Twitter Pinterest Harriet Green led a cost-cutting drive after the company’s flirtation with bankruptcy in 2011. Photograph: Thomas Cook/PA

There would be some logic to a Westminster bailout, even if reports suggest a state rescue is unlikely, given the state of the firm’s finances. Nonetheless any money loaned to Thomas Cook might one day be recouped, while repatriation costs would not. But the experience of Carillion and British Steel, both of which collapsed after being refused government bailouts, indicates that state support is a long shot.

Back in 2011, when Thomas Cook last flirted with administration, it navigated a path to recovery thanks to the forbearance of its lenders. That near-death experience left scars that haven’t healed. The money it borrowed to secure survival then is central to why Thomas Cook is struggling now, because it left the company groaning under the weight of its debts. It has paid out £1.2bn in interest since then, which meant that more than a quarter of the money it charges for the 11 million holidays it sells every year goes into the pockets of lenders.

Debt-laden businesses walk a tightrope, vulnerable to bumpy conditions and sudden shocks. And there have been plenty of those. Short-term misfortunes include high jet fuel prices and terror attacks that scared customers away from North African destinations such as Tunisia and Egypt. Last year’s unseasonably hot weather was another temporary setback, as regular holidaymakers across the UK and important regions such as Scandinavia spurned foreign trips in favour of soaking up the sun at home. More recently, the impact of Brexit uncertainty has made some passengers less willing or less able to fork out for overseas travel, even at relatively low package holiday prices.

The tour operator’s problems run deeper than that, though. The past two decades have spawned an army of online holiday companies offering flights, transfers, hotels and insurance. Package holidays remain popular, and for the most part good value, but they are no longer the only game in town. Amid such stiff competition, hoteliers have felt more able to raise their prices, chipping away at tour companies’ profit margins. And all the while, those debt interest payments have been going out of the back door, using up cash that could otherwise have been used to invest in fending off that competition.

Senior industry figures think the roots of the debt problem go back further, beyond the 2011 rescue to Thomas Cook’s 2007 merger with MyTravel. What followed then was a series of sizable deals, many of them under the tenure of former chief executive Manny Fontenla-Novoa. The company pursued acquisitions to increase its online footprint and capture customers in new regions and markets. Many of these deals were costly and badly integrated.

“It feels like a very long-term story of corporate governance structure and the wisdom of acquisitions,” said one travel veteran. “Put that in the context of a group that is carrying a high cost of debt and isn’t in a position to invest in transition, either online or investment in hotel products. You’re not able to reinvent yourself. It doesn’t matter if you’re one of the best brands in UK travel, you can get left behind.”

Thomas Cook did try to reinvent itself after the 2011 crisis: it hired turnaround specialist Harriet Green as chief executive the next year. She brought energy and a ruthless zeal for cost-cutting, as well as a curious mixture of take-no-prisoners straight talk and sloganeering. Green described herself as a “landa” – a cross between a lion and a panda.

The landa style went down badly at Thomas Cook, something of a boys’ club of industry traditionalists. She was shown the door within three years, after securing the company’s immediate future.

Whether that was the right decision or not, Thomas Cook finds itself back where it was before she joined. This weekend will be pivotal and, despite the complex history, the facts are simple: Thomas Cook will go under unless it raises £200m.

That could come from new lenders, as yet unnamed. Asset sales are also on the table, such as the sale of its Nordic business to private equity group Triton, which made a bid earlier this year. A taxpayer-funded bailout appears to have little chance of happening.

Otherwise, Thomas Cook is fated to join the likes of BHS and Woolworths – household names that disappeared into oblivion.