I knew grammar school was going to be different to my life experience to date when, as we lined up in our caps and shorts, the teachers swept dramatically into view. Half were priests in long, black robes, one of whom appeared to be wearing makeup and perfume. Thus began seven years of educational privilege.

To get there, I’d had to pass the 11-plus and a written test at the school itself. The 11-plus asked me to differentiate between vegetables and fruit, while the entrance exam asked me to write an account of the battle of Waterloo. That was how they weeded out the merely bright from those who were both bright and aspirational for the distinct social role we were to play.

As the Tories prepare to reinstate selection at 11, it is worth remembering that grammar schools were only the second tier of a three-tier caste system, carefully moulded on to the workforce stratifications of the postwar era.

At Thornleigh Salesian College, Bolton, in the 1970s, we were encouraged to think about university, but only a tiny minority were groomed for Oxbridge. As a result, when I meet my classmates, I find mainly technocrats: two chief fire officers, a senior police officer, a senior civil servant, a few top engineers. Our annual visit to the local private school, so they could destroy us at rugby union and then clap us politely into afternoon tea, revealed that theirs was a different world.

This three-tier system was functional in that the economy needed clever, skilled people to do the top layer of manual jobs; managers to organise and innovate; and an elite to do the higher brainwork.

As demand increased after 1945 for white-collar workers and middle managers, the country needed significant numbers of working-class kids to “escape” the world of semi-literacy into the ranks of the salariat. But you also needed to keep enough clever kids inside the manual workforce, to form the “labour aristocracy”. So, in every class of 30 kids, there were maybe five who went to grammar, and two or three who should have, but did not. It was cruel, but for a couple of decades, supply matched demand. And then suddenly it didn’t. The designers of the comprehensive system understood that this rigid, lifelong stratification would be dysfunctional in an economy based on information.

In the early stages of an information economy, you need to maximise the human potential of everybody. That was the assumption behind making a target of 50% of 18-year-olds to go to university, and removing the social barriers implicit in the grammar school system.

But for the fully fledged information economy that is coming, we’ll need something more. A visionary education minister today would not be obsessed with re-fighting the battles of the 1970s, but thinking radically about the rapid transformation of work that is underway.

By mid-century, 47% of existing jobs will be susceptible to automation – not just low-skilled jobs, but also in the legal, medical and creative professions. But automation of human-designed processes is just one of the challenges we face. Another is the rise of artificial intelligence.

In each phase, the information revolution will destroy jobs. But once artificial intelligence becomes stable and reliable, work will become, for a significant number of people, the art of asking a computer a sensible and challenging question.

The “divide” in the 21st-century economy will be between tasks you need a human for and those you don’t. What work remains will either be divided equitably, by the reduction of working hours and lives, or inequitably. If inequitably, then – as with acting and journalism in Britain today – the top jobs will go to a public-school-educated elite.

If Theresa May understood this, she would forget about grammar schools and do something far more radical: scrap the majority of tests, scrap the coercive inspection regime and scrap most of the national curriculum.

If Sats, league tables and Ofsted bullying had any use at all, it was to force the remnants of the “secondary modern” mentality out of failing comprehensives. Under successive Labour and Tory governments, however, the arrangement has become simply a whip for driving schools out of state control and into a quasi-private sector, and for imposing uniformity.

The type of person typically produced by uniform and coercive education systems is well-behaved, articulate, literate and dull. Such people will come ill-equipped for a period of revolutionary technological change.

The rational core of nostalgia for grammar schools is that they were, at their finest, intellectual hothouses bringing working-class kids to the world of ideas and debate. Maybe my memory is faulty, but amid the long, hot afternoons discussing Othello, glacier formation, frog anatomy and the annexation of the Sudetenland, I cannot remember any attempt to “teach to the test”. It would have been pointless, because the test, too, was unpredictable and individualist – and the markers were told to value problem-solving and creativity.

The best state schools aim for individualism, creativity and intellectual stimulus – but they often have to do it in defiance of the testing, marking and inspection system.

The huge challenge facing education is that, having systematised both secondary and undergraduate education, so that it produces a standard neoliberal employee, technological change makes it very uncertain what a future employee is going to do.

The best way to cope with uncertainty is diversity. If grammar schools were the way to reintroduce diversity and experiment into post-11 education, they would be worth considering. But they’re not – and their aim is to reimpose a social divide entirely at odds with technological change.

What we need, instead of selection, is to set education free.