LONDON — He suspended Parliament and was rebuked by Britain’s top court. He purged his party and lost a string of votes. After trying to strong-arm lawmakers into supporting his new Brexit plan, Prime Minister Boris Johnson was forced to ask for a delay for withdrawal from the European Union, a request he had vowed never to make.

Yet, while this litany of failures should be spectacularly good news for opponents of Brexit, who came out in huge crowds onto the streets of London on Saturday, Mr. Johnson still has a surprisingly good chance of leading Britain out of the bloc.

Mr. Johnson is not just still in the game, despite a remarkable succession of miscalculations, but he is also within striking distance of a majority vote in Parliament for his Brexit plan. The foreign secretary, Dominic Raab, predicted on Sunday that the government proposal would pass.

The odds are better than ever because three years of Brexit chaos has left the nation angry, frustrated and tired, the opposition is divided, and many expect a general election for which Mr. Johnson has been gearing up, with speeches highlighting platform issues such as more money for the police force.