You know how it is. You are the First Minister of Scotland, enjoying political blue skies since the opinion-poll needle just flickered over the 50 per cent support mark for separatism, but your day is marred by two concerns: did Boris Johnson disrespect you by calling you “Wee Krankie” (why wouldn’t he? – everybody else does) and have you booked up enough premises around the COP26 site to disrupt the proceedings by denying that accommodation to the summit which you are not being allowed to hijack?

Suddenly, as is not uncommon on the switchback ride of politics, a much worse crisis presents itself. Finance secretary Derek Mackay, your acknowledged heir apparent, just hours before he is due to deliver Scotland’s budget, resigns after being exposed as having sent 270 messages on Facebook and Instagram to a 16-year-old boy whom he told was “really cute”. You immediately issue a hard-hitting statement saying: “Derek has made a significant contribution to government, however he recognises that his behaviour has failed to meet the standards required.”

That sounds as if Mackay had underestimated the size of the paper-clip requirement for his department. It is typical of the weasel language of euphemism with which politicians attempt to gloss over one another’s wrong-doing. It is one of the practices that most inflames the anger of the public against the political class. It is also totally ineffective.

For the Scottish government is in deepest doo-doo. As a curtain-raiser to the trial of former First Minister Alex Salmond on 14 charges of sexual offences, due to commence on 9 March, this latest scandal is the SNP’s worst nightmare. To say that the party’s image is becoming tarnished would be a gross understatement. This crisis holes the SNP below the waterline not only on issues of morality but also of judgement and competence.

Does the scale of flawed judgement exhibited by the devolved equivalent of the chancellor of the exchequer, messaging a 16-year-old 270 times over six months, suggest that Scotland’s £43bn budget was safe in his hands? Judgement is not a quality that can be compartmentalized: if Mackay behaved so irresponsibly in his private life, why would we imagine his fiscal decisions would be any more reliable?

Mackay left his wife in 2013, after 12 years of marriage and fathering two sons, publicly declaring his homosexuality. Four years later he observed to a reporter: “I’m sure you can appreciate that it wouldn’t have been easy for my wife.” Now, through his own reckless behaviour, he has left his government and been suspended from his party. Most people appreciate that it will not be easy for Nicola Sturgeon.

Sturgeon is looking down the barrel of a gun, politically speaking. Since the general election just two circumstances have conspired to clothe her failed government with a patina of credibility: her party’s increase in Westminster seats from 35 to 48 and recent opinion polling which has seen a modest increase in support for independence, just sufficient to pass the 50 per cent mark in a couple of polls. But Sturgeon herself must be aware of the fragile, even delusional, nature of these snapshots of public opinion.

As regards the election result, which was not even the SNP’s best performance (it won 56 seats out of 59 in 2015), its causes were in no way a guarantee of continuing SNP ascendancy. For many voters Jeremy Corbyn was as toxic north of the Border as in the south, so floundering Scottish Labour was denied any chance of making a comeback. The Tories, perennially unpopular in Scotland, were identified as representing Brexit in a Remainer country. So, Scottish voters lent their support to the SNP to send a message.

They defiantly signalled majority opposition to Brexit and tried to dissuade Boris Johnson from pursuing a “hard” withdrawal from the EU with the implied threat to break up the Union. The deceptive surge in support for independence in opinion polls has the same roots. Giving a defiant nationalist message to a pollster commits a Scottish respondent to nothing. It expresses resentment, seeks to alarm the London government – it is largely an attention-seeking ploy.

It could become fashionable in the coming year: Scots enjoy twisting the British lion’s tail. The parameters of protest are set wide. Even in a rogue, Holyrood-organised referendum, a Yes vote would be likely, as voters lashed out, secure in the knowledge that such a glorified opinion poll would have no legal or practical consequences. That furnishes an incentive to Sturgeon to hold just such a tame plebiscite.

The disincentive is that, if this were followed by a real referendum, with the threat of Scotland, already out of the EU, leaving the UK – its largest market – with no guarantee of EU admission for years and with a deficit 4.5 per cent above the maximum convergence criteria, canny Scots would be unlikely to volunteer to crash out of the UK into outer space.

Sturgeon knows this. Her recent manoeuvres have suggested increasing reluctance to face an early referendum. That caution will be intensified by today’s implosion of her government. There is still a puritanical streak in the Scots and between the Mackay debacle and the Salmond trial they will be asking themselves what kind of people are governing them. They will also recall that the SNP has been in power since 2007 and may wonder if Scotland is in danger of succeeding a half-century of sclerotic Labour hegemony with a similar period of nationalist futility.

When the Tories in the 1960s were hit by the Profumo affair, the moral turpitude it exposed was only a part of the equation that led to their electoral defeat. The scandal was also seen as part of the natural disintegration of an exhausted, ideas-devoid government that had been in power too long. That must be the growing perception of the SNP. The budget attempted to cure the ailing health service by throwing more money at it; but both Scottish health and education need a vast cultural change if they are to be reformed.

It would be perfectly rational if the Scottish public took the squalid scandals engulfing the SNP as further evidence that the party that took Scottish schools’ performance in maths from 11th place in global league tables to 27th had exhausted its mandate. Nicola Sturgeon once said: “It is one of the little-known facts about modern Scottish politics that it is not quite as cut-throat as people think it is.” Don’t bank on that, Nicola.