Theresa May must have woken up this morning wondering, for a split second, if yesterday was all just a very bad dream. The front pages will hammer home the reality of her situation – she was 'luckless', says one of the kinder headlines. But I wonder: how much did yesterday's shambolic performance have to do with bad luck, and how much to do with woeful preparation?

May's ordeal, and especially her excruciating coughing fits, reminded me of a passage in Jonathan Powell's The New Machiavelli, a sort-of memoir about his time as Tony Blair's chief of staff. The book is also a reworking of The Prince and other texts by Machiavelli: it takes his 16th century advice and applies it now, in the process proving that Machiavelli is still a superb guide to wielding political power – and remains unsurpassed as a political theorist.

At one point, Powell notes Machiavelli's advice to the prince's court from The Discourses (1531): the aim, the Florentine diplomat wrote, must always be to ensure that the prince's 'reputation was greater than his strength'. In The Prince (1513), Machiavelli says that the prince 'should strive to bear himself so that greatness, courage, wisdom, and strength may appear in all his actions'.

Powell translates this for the modern age. The modern leader must 'be seen in public to be a superman... It is the job of the court to make him appear other than he really is'. Advisers and chiefs of staff must make sure that the 'myth of the great and all-powerful leader was maintained'. You don't want someone to pull back the curtain, as in The Wizard of Oz, and reveal the less impressive truth.

So, Powell comments:

“ A prime minister is therefore never allowed to be sick. Tony [Blair] as a result had to give speeches with a sore throat that made speaking in a normal voice intolerable, and we had to find strong anaesthetics so that he could speak at all. He had to carry on with foreign trips although half dead with flu and having to be propped up. He fought the 2005 election... with an inflamed disc in his back.

However much we pity her, it seems fair to ask if Theresa May's court – her chief of staff and others – did everything they could to prevent yesterday's humiliation. Alastair Campbell, Blair's spin doctor, thought not on Twitter:

https://twitter.com/campbellclaret/status/915538391525216256

It wasn't as if her cough and lost voice was a tremendous surprise. The day before, Nick Ferrari, a veteran broadcaster, asked her on LBC whether her voice would really hold out. Her interview with him was one of 26 that she did on Tuesday. Was that sensible? Did they get a doctor involved before she spoke on Wednesday?

Ultimately, May might have survived the very unfunny P45 prank, the lettering falling off the staging, and the almost incredible fact that her speechwriter apparently plagiarised The West Wing.

“

Listen to Theresa May as she plagiarises President Bartlett from TV show the West Wing. pic.twitter.com/jDmmTbkIS3

— I was a JSA claimant (@imajsaclaimant) October 4, 2017

But I suspect, having seen the Prime Minister struggling with her health at a key moment in her political career, even if it was just a cold, we will never think of her in the same way again. Her court should have been able to prevent that.