George Bernard Shaw, being Irish, never bothered to mince his words about the neighbours. A lifelong Fabian, he loved to mock the pretensions of the Edwardian upper classes. In his 1916 preface to Pygmalion he wrote: “It is impossible for an Englishman to open his mouth without making some other Englishman hate or despise him.”

In the UK, the way we talk carries — literally — overtones that are supposed to speak volumes about each of us. All too often, though, those volumes need to be consigned to the department of 19th-century fiction. Snobbery really isn’t what it used to be. Yet most people would accept that, whether intentional or not, prejudice based on social background can still stand in the way of promising careers.

This year a University of Cambridge study suggested that Brits regard men who speak in the tones of Liverpool or Bradford as more likely than most to hold on to a wallet picked up in the street rather than hand it in to the nearest police station. Londoners and posh southerners were thought to be more likely to be associated with sexual impropriety. Geordies registered as more friendly, and Glaswegians and Ulstermen, improbably, as less physically threatening. I would plead guilty to falling for any offer made in the seductive lilt of Ireland’s southwest. There is precious little evidence to support any of these presumptions. But as Eliza says in My Fair Lady: “The difference between a lady and a flower girl is not how she behaves, but how she is treated.”

Two years ago the Social Mobility Commission convened a “masterclass” to warn employers of the danger of bias based on accents — it’s not illegal but it is thought to be a more common cause of discrimination than supposed, even if unconscious or unwitting.

Few people could stomach this film — here’s why it’s comic genius

It would be surprising — especially with Reform breathing down its neck in “red wall” seats — if this kind of class prejudice, however subtle, did not, at some point, become a rallying cause for a Labour government, even if in the usual muddled, muted, legalistic Starmerite way.

The education secretary Bridget Phillipson struck the first blow with the imposition of VAT on private school fees. The walls of privilege did not fall; the wealthy apparently decided to pay up ahead of the new tax. The principal victims are probably immigrant parents ready to work a third job to pay school fees and the families of disabled children for whom private schooling may now become prohibitively expensive.

A more recent assault may have more impact. This month the minister Pat McFadden announced that, as of next year, the so-called “fast-stream” route into the senior civil service would be open only to the children of working-class families. McFadden, the son of a labourer and a child care assistant, and now risen to become the grandly titled Chancellor of the Duchy of Lancaster, is himself a walking advertisement for social mobility. Given that civil service numbers have grown to more than half a million in the past year and show no sign of falling, he has a chance of replicating his own story a thousand times and more.

But in these stakes no one is allowed to outdo Labour’s latter day La Pasionaria, Angela Rayner. The deputy prime minister, it has been reported, is preparing to extend the provisions of the 2010 Equality Act to place discrimination based on socio-economic background on the same plane as race, sex or disability. A noble aim. But this would be a far more ambitious — and contentious — project.

Conservatives complain that Rayner plans to shut the middle classes out of the best schools. This is sheer nonsense. The first paragraph of the Act does, theoretically, demand that all public bodies pay “due regard” to the effect of their actions on the balance between those born into affluence and those not. Being the person who proposed it, I can say that the law as it stands is hardly revolutionary, merely a modest transparency measure that would force government departments to be honest about the impact of their policies on different socio-economic groups.

Rayner will face some practical obstacles if she wants to do more. To start with, class is not like race or sex. We can change the way we pronounce our vowels and drop our aitches but we cannot drop our chromosomes. No amount of skin-lightening snake oil or painful surgery can take us across that line.

Second, the class system is not immutable. Deciding who stands where is almost impossible. The most commonly used indicator to determine your socio-economic category is your higher-paid parent’s occupation at the age of 14. But the times change; the fact that a plumber is likely these days to earn more than a professor doesn’t turn the latter’s offspring into horny-handed sons of toil.

Third, not everyone wants to be middle class anyway. Income and occupation are treacherous guides to the good life. The most recent report by the Social Mobility Commission makes the striking point that many of us would happily trade professional status or income for the opportunity to be able to live and work in the town in which we grew up. As the sociologist William Bruce Cameron said: “Not everything that can be counted counts and not everything that counts can be counted.”

Finally, the advance of AI may well make our historic notions of class irrelevant. The jobs said to be most at risk from the rise of artificial intelligence are white-collar roles: bookkeepers, administrators, some kinds of lawyers — historically the rungs that led to upward social mobility among the baby-boomer children of blue-collar workers.

There are roles that no robot will be trusted with for many years to come: healthcare assistants, social work, physiotherapy, plumbing, construction, firefighting, law enforcement. These roles will, inevitably carry greater rewards, and with them social status.

There is nothing wrong with Labour following its great tradition of standing up for social mobility. The deputy prime minister made the point herself a few months back that her own rise from teenage single mother to one of the most significant players in government would not have been achieved without the Blairite push for the minimum wage, flexible working for women and access to further education.

But these measures were never presented as assaults on middle-class privilege. Ministers need to ditch the slogans and focus on building more homes, reforming public services and having the courage to tell an ageing population that we spend too much on the old and not enough on the young.

Simply applying the fashionable class-war rhetoric borrowed from other kinds of disadvantage may offer great theatre. But that’s all it is. Labour’s much-put-upon “working people” deserve better.