For Theresa May, the worst has been saved for last. After taking her final prime minister’s questions, she will be driven to Buckingham Palace on Wednesday afternoon to perform the most personally disagreeable task of her time at the top. After tendering her resignation, which will be painful enough, she will have the even more hateful duty of recommending that the Queen invites Boris Johnson to become the new prime minister.

Her failings have been a major contributory factor to his ascent. Tory activists think he will deliver them the Brexit that she couldn’t and cheer them up after the torture of the May years. Tory MPs believe that he has the campaign skills to scupper Nigel Farage and squash Jeremy Corbyn. None of which is going to be much use to him in the critical opening weeks of a premiership that will inherit all the problems that defeated Mrs May and with some extra challenges of his own.

He will have to learn how to be prime minister. The schoolboy who wanted to be “world king” has spent many years lusting after the job, but that is entirely different to doing it. Many previous tenants of Number 10 will testify that no other role is an adequate preparation for the demands of the premiership. Tony Blair, a highly accomplished leader of the opposition before he moved into Downing Street, once told me that he didn’t really get the hang of it until he had been doing it for four years and he had the shock absorber of a landslide majority while he was learning on the job. Gordon Brown arrived with a decade as chancellor under his belt, but floundered desperately as prime minister. Boris Johnson has never been in charge of a public service department and was an embarrassment in the one cabinet position that he has held.

The optimistic forecast of a Johnson premiership argues that he understands his own frailties and will surround himself with sensible people who know how to make things work. They point to his time as London mayor, but that experience is distant and not all that relevant. He and the City Hall veterans he will take into Downing Street will soon learn the difference between wielding circumscribed powers over one city and taking total responsibility for the fortunes of a deeply divided nation at one of the most perilous junctures of its modern history.

The civil service is paid to help and will usually look forward to an exhausted premiership being replaced by a fresh one. Contrary to some popular tropes, civil servants respond well to purposeful political leadership. In this case, though, Whitehall is preparing for the Johnson premiership by adopting the brace position. Is this because he is infamously cavalier about detail, bored by complexity, known to react peevishly and sometimes with a ferocious temper when frustrated or contradicted, and has a notoriously casual relationship with the truth? All that and more. The core fear about a Johnson premiership is that officials will not feel confident that they can speak truth to power. Even some of his friends admit that he sent a disastrous message when he failed to stand by Sir Kim Darroch following the leaking of the ambassador’s confidential assessments of the Trump regime. After the briefing on the nuclear deterrent that every incoming prime minister receives, one of the first tasks of the cabinet secretary and other senior mandarins will be to update him on the latest thinking about the EU’s negotiating position and the consequences of a no-deal Brexit. Who will want to puncture his fantasies about what the EU will agree to and warn prime minister Johnson about the hazards of a calamity Brexit when they are likely to be received with a contemptuous lecture to “get off the hamster wheel of doom”? Another deep anxiety in Whitehall is that they will be smeared as scapegoats if it all goes horribly wrong. Since he won’t want to accept the blame for shattering the economy, his instinct will be to accuse others.

Even some of his friends admit that Johnson sent a disastrous message when he failed to stand by Sir Kim Darroch, pictured. Photograph: Paul Morigi/Getty Images

His peer group in the European Union will endeavour to put a diplomatic mask on their incredulity that he has been chosen as prime minister. They want an orderly resolution to Brexit, but there is no reservoir of trust for a man who rose to journalistic fame by confecting fabrications that toxified British attitudes towards the EU and who then fronted the mendacities of the Leave campaign. The chances of striking a bargain have been made slighter by the way in which he has campaigned for the leadership. He might have used his dominant position in the contest to introduce some realism into Tory minds about what can be achieved and give himself some scope for manoeuvre. He has instead upped the ante on himself by declaring that Britain will be out on 31 October, “come what may”, “do or die”, deal or no deal. In the closing stages of the campaign, he made reaching an agreement even harder by saying that he wants the Irish backstop ripped out of the agreement altogether.

The case made for him by his cheerleaders is that he is a master of the theatre of politics

The case made for him by his cheerleaders is that he is a master of the theatre of politics, a skill that was absent from his predecessor’s rigid repertoire. He will have a chance to display that characteristic once the prime ministerial limousine has conveyed him from Buckingham Palace to Number 10 to make the customary doorstep speech. We should expect typically florid phrase-making about seizing the opportunities of Brexit, looking to the sunny uplands, making Britain great again and similar braggadocio. The grandiosity of his rhetoric will be swiftly mocked by the crimped circumstances in which he is going to find himself. He will not be in the happy position of Margaret Thatcher in 1979 or Tony Blair in 1997 or even David Cameron in 2015. He will not be a freshly elected prime minister with a mandate from the country that he can call his own. He will have been put there by the tiny minority of people who are members of the Tory party. Whenever he claims to speak for the nation, the nation will be entitled to rebuke him for that presumption.

A man who sees himself as a freewheeling buccaneer will be confined in the straitjacket of a hung parliament. Assuming the continued support of the Democratic Unionists, he will inherit a working majority of just three. If the Tories lose the Brecon and Radnorshire byelection in early August, the effective majority drops to two. One defection to the opposition benches by a Tory MP repelled by a Johnson government would then eliminate its majority.

The cohort on the Conservative benches who are adamantly against a crash-out Brexit flexed its muscles last week by combining with the opposition to defeat the government on the issue of shuttering parliament to ram through withdrawal without an agreement. Their numbers will be expanded by an influx of members of the current cabinet – including Greg Clark, David Gauke and Rory Stewart – who will be on the backbenches for a Johnson premiership. We have got so used to the extraordinary and the unprecedented in Britain’s Brexit-addled politics that people were barely surprised when Philip Hammond, while still in post as chancellor, declared that he would not rule out voting for a no-confidence motion in his own government if that is what it took to prevent a calamity Brexit. Mrs May will also be on the backbenches, holding another vote that can be used to thwart the last person she wanted as her successor. One of Mr Johnson’s most vainglorious boasts has been to tell Tories that he can “unite the party and then the country”. A feature of his premiership, as of hers, will be Number 10 pleading with Tory MPs to fall into line. These exhortations will have scant traction with the significant number who feel they owe no loyalty to a man who displayed none to either of his predecessors as prime minister.

The most intense pressures on him will be self-made. En route to Number 10, he has made large promises that are going to be tested to destruction when campaign poses collide with the reality of a precarious premiership. He has told his party that he will get them a much better deal than Mrs May and, if the EU doesn’t succumb to his demands, Britain will leave without an agreement on Halloween. He has also promised his party that there will not be an election before Brexit is done. He has further declared that he will not countenance another referendum. At least one of those pledges cannot be kept. When it has to be broken, I’d quite like to see the look on Theresa May’s face.

• Andrew Rawnsley is Chief Political Commentator of the Observer