This is it. Next week sees the end of the beginning of Brexit – and the beginning of the end. Theresa May is determined to offer herself for ritual lynching by her mob of free-trade anarchists, having spent two years failing to face them down. Parliament will then liberate itself from her torture, and seek a new way forward. The plan is for May’s defeat on Tuesday to be followed by a vote against no deal, and then by its only sane consequence, a vote to delay article 50. To make that delay acceptable to the EU, there must be a plausible reason for it. That means a plausible alternative Brexit agreed by the British parliament. What is that alternative?

The answer began to emerge last Wednesday from talks between the Nick Boles/Oliver Letwin group of Tories and Labour’s leader, Jeremy Corbyn. It is for the UK to leave the EU, but remain a member of the European customs union. It avoids the Northern Ireland border issue, honours May’s commitment to “frictionless” trade, and meets a hundred other reasonable concerns of those involved in Britain’s dealings with Europe. There is no question that there would be a Commons majority for such a proposal, as there is already in the House of Lords. Only the glaring inadequacy of the two party leaders has prevented a multiparty agreement on remaining in the customs union being already reached.

This way forward was clearly acknowledged by the chancellor, Philip Hammond, on Thursday. He predicted that “a consensus will have to be forged across the House of Commons, and compromises will have to be made”. The clear indication was that Hammond would himself seek such a consensus. It was the starting gun for sanity. It marked the end of Marmite Brexit – you either love it or hate it – and the dawn of vanilla Brexit.

We can resist smug talk from the rest of Europe about this chaos. Britain is the only EU country that has had the guts to ask – and obey – its people on EU withdrawal, and then to conduct a raging debate as to what it really means. It may seem a peculiarly British form of self-harm, but meaningful democracy is often painful. Looking back, I would rather have Britain’s 1832 – and 2016 – than France’s 1792 or Germany’s 1933. Sooner or later, the EU’s “ever closer union” was bound to lead to a crisis with Britain, as it will soon with other countries. Europe should get used to it.

Theresa May delivers a speech in Grimsby on Friday, calling on the European Union for ‘one more push’ to strike a compromise. Photograph: Christopher Furlong/AFP/Getty Images

Strip out the rhetoric, the false polarisation and the personal ambition, and parliament should see where compromise lies. From the start of this debate, most Britons have indicated a desire to proceed with Brexit but, as was pledged by May, on the basis of continued “frictionless” trade. There is no argument here. Frictionless means a customs union. That in turn means agreeing regulations usually laid down by the larger partner, in this case the EU. Brexiters’ “deals with the rest of the world” are a nonsense. Do they really think Britain can “take back control” on trading standards from the Americans or the Chinese? Is it for this fantasy they will inflict their greatest humiliation in history on their party’s leader?

The real issue on which Brexit opinion has always wanted to see change is migration and the right to benefits. It can. Migration is not part of a customs union, only the single market. That would be a quite different, possibly later, negotiation. Besides, with the EU’s Schengen area collapsing, migration is now a matter of heated debate among states across the EU. Had May faced down her enemies on trade and tariffs, a single-market deal on migration could have been negotiated.

Next week will be Black Tuesday for the Tories. The Brexit ball will then emphatically be in Corbyn’s court. He must stop ranting, taunting and equivocating. He must become a very different leader, heaven help us, calming, compromising, uniting a distressed nation. He and customs union supporters among the Tories and minority parties must agree a motion sufficiently explicit to induce Brussels to agree a delay. The British government – goodness knows what British government – must then implement parliament’s decision to avert no deal. There must at last be a Commons majority that is for something, not just against it.

The Labour leader, of course, has to handle his own MPs, many of whom are lobbying for another referendum. Corbyn’s answer should be: first things first. Once Brussels has agreed a delay, a transitional deal and a political statement on future relations, the case for a confirming plebiscite, as in 1975, would be strong. At the very least it might calm jangled nerves. Evidence suggests an emphatic acceptance of a Britain outside the EU but within some form of shared economic space.

Nothing about Brexit was going to be easy or ideal. Staying in a customs union does not negate Brexit. But it does honour the double commitment that May and her government made to voters: to leave the EU but retain open trade with the continent. Throughout history Britain has wavered “in and out” of Europe. It is now embarked on an out phase. But at least it has an opportunity to forge a compromise. Jeremy Corbyn’s improbable destiny is to deliver it.

• Simon Jenkins is a Guardian columnist