Nicola Sturgeon is gathering her forces once more for another tilt at Scottish independence. Her strategy has been a careful one; too careful for some. Thus when she called for an independence referendum in 2016 she already knew that an embattled Theresa May could not possibly grant it. This was a tactical advance that allowed her to measure the appetite for a second referendum at Holyrood and in Scotland while reminding Westminster that the issue would never go away.

Before the Battle of Austerlitz in 1805 Napoleon restrained his generals when the Russian and Austrian forces attempted to cajole the French army’s right flank into a premature skirmish. He knew it was not the right time and place. “The enemy is making a false move, why should we interrupt him,” said Napoleon. It seems that Scotland’s first minister has been urging her chief strategists in a similar vein.

The two-year Brexit negotiations between Westminster and Brussels have barely advanced towards anything meaningful, bogged down by the sheer arrogance of David Davis and the pantomime antics of Boris Johnson. Inevitably, there would come a point when the Scottish government would extract a price for having in effect been locked out of the negotiations. It was just a matter of being prepared to exploit it when the moment presented itself, as it did with some theatre two weeks ago. When Westminster debated the EU withdrawal bill, Sturgeon found that she didn’t really need to do much at all: the scarecrow right wing of the Conservatives was doing her work for her.

In recent months, though, it has been evident that the SNP has been shifting through the gears towards the second independence referendum and attending to some domestic chores.

One of these came at the beginning of last month when the first minister delivered the annual Cardinal Winning lecture in front of the west of Scotland Catholic establishment. The event was not widely heralded or reported, but it may yet turn out to be of crucial importance. Her keynote speech marked the 100th anniversary of Catholic education in Scotland and came at a time when many Catholics were beginning to feel a little unappreciated by the Scottish government.

Among all of Scotland’s faith communities, support for independence was highest among Catholics and especially so in those populous strongholds in the west, which delivered a Yes vote in 2014. Yet some foolish comments by senior SNP figures about putting an end to Catholic schools and references to “plastic Irishmen” were beginning to get tedious.

In her speech, Sturgeon nailed all of this. “The Scottish government is an unequivocal supporter of Catholic schools; we value the contribution that Catholic schools make towards modern Scotland and we want that contribution to continue in the years ahead,” she said. “We are celebrating a national success story.” Her remarks exceeded the expectations of all those present and settled the issue for a generation.

This was preceded by the eagerly anticipated publication of the sustainable growth commission report on the economics of an independent Scotland. It was a mature and sober analysis of future economic prospects. An independent Scotland would thrive, it stated, but there would be challenges and struggles along the way. Those on the left who dismissed it as a charter for austerity entirely missed the point: this was a tactical paper which would be used to silence the catcalls of unionists in a second referendum when they started yelling about a never-never-land of milk and honey.

Last week’s cabinet reshuffle was not just the most dramatic of her own tenure, but of the SNP’s 11-year reign. Almost half of her cabinet changed in a move that addressed some concerns, especially among the SNP’s Westminster contingent, that real influence in the party was wielded by a very small Sturgeon kitchen cabinet. In particular, the appointment of the impressive and universally liked Jeane Freeman to health was welcomed following her success as minister for social security. The reshuffle also saw the party’s deputy leader, Keith Brown, one of the most influential figures, being relieved of all cabinet responsibilities to concentrate full time on organising the second referendum.

Keith Brown has been relieved of cabinet responsibilities to concentrate on organising a second independence referendum. Photograph: Russell Cheyne/Reuters

The timing of the reshuffle neatly drew a veil over the decision to delay an important part of the government’s education bill, another sign that the proposed legislation is proving to be more difficult than had been expected. Predictably, it elicited fresh scrutiny of Sturgeon’s historic vow to reduce Scotland’s educational attainment gap. She may have let her heart rule her head in making such a commitment, but it did signal that Scotland’s political leader harbours more than a degree of passion about this.

The gap that exists in educational attainment will never be reduced solely by adroit legislation and social initiatives anyway. None of that addresses the key reasons why poor children fare worse than their more affluent neighbours. This is like running up a down elevator or trying to seek concupiscence in a convent.

Equality gaps, whether in health or education, will always be the consequence of powers retained at Westminster. They are ones deployed to further impoverish disadvantaged communities by the universal credit system and a tax regime that still favours Britain’s richest people and its biggest corporations.

As party membership reaches another record high, the ground is being prepared for a second referendum and, one by one, the loose threads are all being sewn up.

• Kevin McKenna is an Observer columnist