Thank God for Boris Johnson. No, seriously. The opposition parties in Westminster may not realise it, but they owe the Tory Prime Minister a debt of gratitude for unblocking our constipated and failing democracy. Boris behaving badly has forced them to get their act together at last.

The Prime Minister has been playing fast and loose with the rules. Who’d have thought it? He has rolled up the autumn recess and added it to the pause, or prorogation, in parliamentary work that normally precedes a Queen’s Speech. This constitutional jiggery-pokery squeezes the timetable for debate before Brexit Day. But it is not exactly the Reichstag Fire, as one over-wrought academic suggested last week. It is not the abolition of democracy.

Nor does this executive “coup” prevent Parliament blocking a no-deal Brexit. There is still time – just. Johnson has given them just enough rope to hang themselves – or hang him. As it happens, Mr Speaker is also setting aside convention and hallowed precedent.

On Tuesday, he will allow MPs to use an emergency device to take over Parliament and force Johnson to keep Britain in the EU until there is a deal struck with Brussels. John Bercow has been here before. He defied convention and nodded through the Cooper-Letwin Bill last April, which led to the last delay in implementing Article 50.

That scratch legislation took four days. Even with the prorogation, there will still be nearly three weeks of parliamentary time – longer if MPs vote to sit at weekends – to get it through. Indeed, those claims that Parliament was being “shut down” may sound a little hysterical this week as MPs proceed with business as normal.

Well, not quite normal. This is all highly unorthodox. In our system, only the Government is supposed to make legislation – put bills before the Commons. Indeed, this parliamentary ploy could set an awkward precedent for any future minority Labour government. Once it is established that Parliament can frame and pass its own legislation, in defiance of the Government, then Jeremy Corbyn might find the Commons telling him what to do. MPs might pass a motion legislating for proportional representation, or a written constitution, or reverse nationalisation.

Of course, Brexit is a special case. Parliament is right to use any means at its disposal to prevent a no-deal Brexit which a majority of MPs oppose. But my own view, and I speak as a Remainer, is that resorting to procedural devices to stop Article 50 is probably a waste of time.

Cooper-Letwin got through last time largely because Theresa May didn’t really oppose it. She was against no-deal herself. This unorthodox parliamentary device helped her get off the Article 50 hook, and ask for the extension she wanted. Boris Johnson will not be so compliant because he doesn’t want an extension.

There are many ways in which Cooper-Letwin 2 could fail, most obviously in the Lords, where there is no timetabling of debate. Or at Royal Assent. And even if Parliament passes this one-line bill calling for an extension of Article 50, Brussels may not be able to accept it.

Last time, Donald Tusk, president of the European Council, said that the 27 member states were only prepared to consider an extension if there was a good reason for it. Now, with a new Prime Minister – who will still be in power, remember – telling them there will be no further negotiations, and that he does not want an extension, then Brussels will be in an awkward position.

The European Union can’t negotiate with Parliament – only with the UK Government. And the UK Government will have left the scene. I don’t see how an extension of Article 50, which has all sorts of implications, not least financial, could happen if the UK Government refuses to co-operate. Johnson would simply say he is not picking up the bill, and will not implement any deal that’s proposed.

In the end, the only way to guarantee an extension of UK membership of the EU past October 31 is to replace Johnson. MPs have the absolute constitutional right to do this under the Fixed-term Parliaments Act. If the Prime Minister is behaving in an overbearing and authoritarian manner then Parliament can and should pass a vote of no confidence (VoNC) in him. Johnson has a majority of only one MP and there is a number of die-hard Tory rebels, like Dominic Grieve, who say they will do anything to prevent a no deal.

Some MPs believe a VoNC would play into Johnson’s hands. That he would force an immediate General Election and go to the country complaining that the “saboteurs” and “remainiacs” are defying the “people’s will” as expressed in the 2016 referendum. It could come to that – but not immediately.

The Act is very clear. The PM can only hold an election if no alternative government is formed within 14 days of the VoNC. The Commons is therefore free to elect a “caretaker” Prime Minister whose sole purpose will be to go to Brussels and negotiate another extension.

Brussels would almost certainly agree to this request because Johnson would no longer be in Number 10. The caretaker Prime Minister would then have to plan for a General Election on Parliament’s own timetable, and leave it up to the voters to decide the matter.

Yes, it is possible Johnson would still win this General Election. But, crucially, Britain would still be in the European Union. As things stand, Britain will crash out on October 31 by law. Johnson can run down the clock and if he isn’t stopped then he surely will.

As this column has argued before, we’re only in this mess because MPs (SNP excluded) voted by an overwhleming majority in 2017 to pass Article 50 without having any idea what it meant. Labour whipped its own MPs to vote for a blank-cheque Brexit. The Brexiteers are right: under Article 50, the default is no deal, and MPs only have themselves to blame for that.

For the last three years, the parties have been playing games to distract themselves from the consequences of their own folly. Labour has tried to look both ways, supporting both Brexit and a referendum – a disreputable and contradictory position. The Liberal Democrats have put party before principle by refusing to support a caretaker government led by Jeremy Corbyn.

Yet he is the leader of Her Majesty’s Opposition and is the only person with the right to move a VoNC in the Government. Like it or not, he is the person whom the Queen will invite to form an alternative government – at least in the first instance.

Parliament is sovereign in our system, but it cannot exercise that sovereignty when it is at odds with the government of the day.

The government has to be removed before MPs can act with any real effect. There is enough time to bring down Boris Johnson and replace him. This is the only certain way to prevent a no-deal Brexit on October 31. That is, if MPs really, really want to.