This dismal, unnecessary election, conducted between the scream of police sirens and the murders of civilians, will be remembered for one thing only: the dementia tax. In years to come, political pros will shake their heads at the naivety of Theresa May. She appeared invincible, they will say. All she had to do was to keep quiet, turn up and she would win a landslide victory.

Then she faced one of the great questions of the day. Everyone says they want politicians to do that. Who has not exclaimed that they must stop listening to focus groups and be brave? May was, and see how she has suffered. The PM understood that the social care system cannot cope now, and could collapse as more of us trudge into senility.

May proposed using the vast (and unearned) housing wealth of pensioners to cover the costs of their care. Pensioners would have to pay until their savings and assets were down to £100,000. The present cap is £23,250, so May’s plan seemed generous. But the scope would be widened to catch far more people. The estates of the infirm receiving care in their houses would be liable as well as those in residential homes.

Gordon Brown began the bribing of pensioners for votes. It reached levels that would embarrass a mafia boss under Cameron and Osborne. May’s dementia tax, along with the Conservatives' plans to end the triple lock on pensions and means test the winter fuel allowance, was the first break with a system that was turning Britain into a gerontocracy. The old, growing ever more numerous in number and being far more likely to vote, would lose their own lock on government policy.

The older you are, the more likely you are to have money, of course. But index-linked pensions (now all but dead in the private sector) benefit rises, and property-price inflation have created the unprecedented situation where typical pensioner incomes after housing costs are now higher than those of 25-44 year olds. The young’s incomes are still not back to their pre-crash peak in 2007, while incomes among pensioner households have grown by 9 per cent. (The Resolution Foundation can give you more if you need it.)

Thus May was not just tackling a growing care crisis, she was tackling a lopsided tax and benefit system. And these reasonable and brave ambitions destroyed her election campaign. The polls went against her. Her personal ratings fell. Corbyn was in with a chance, and she U-turned with such speed you could smell the burning tyres.

I admit that there was arbitrariness in a proposal that meant you lost your right to pass on your property if you had dementia but not if you had cancer. There are better ways of raising the money. We could simply tax inherited wealth as income. We could take the Japanese system of compulsory care insurance for the over-40s. Or go back to the Dilnot commission.

These are good ideas but doomed. The lesson of this election will be that you never take on the baby boomers. Theresa May did, and look what happened to her. I do not wholly blame Labour, and indeed the Lib Dems and the SNP, from profiting from the Tories’ woes. They were opposition politicians facing a Tory landslide, and any stick to beat the Conservatives would do. But look where we are now. Inherited wealth has always held a special place in socialist demonology. It makes a nonsense of all talk that Britain is a fair society, for it builds a plutocracy not a meritocracy. If a dementia tax is arbitrary then it as nothing compared to the lottery which hands legacies to the children of the middle and upper class.

'Wealth in modern societies is distributed according to opportunity; and while opportunity depends partly upon talent and energy, it depends still more upon birth, social position, access to education and inherited wealth', said the great socialist philosopher R. H. Tawney. Thomas Piketty recently devoted 700 pages to explaining how capital trumped hard work and entrepreneurship. Invested, and inheritable, capital in stock and property is now growing faster than income, he claimed, to universal consternation from defenders of the status quo.

Yet look at the most left-wing Labour leader ever. Jeremy Corbyn has spent the campaign defending the right of the rich to pass wealth to their children. (After witnessing that performance, Piketty must be glad he resigned from Labour’s council of economic advisers).

When you go further into the manifestos, the bias in favour of wealth becomes more striking. As the Institute for Fiscal Studies explains, the Conservatives would go ahead with large cuts to working-age welfare benefits. These would save £11 billion a year in spending by 2021– but would reduce the incomes of the poorest working-age households significantly. Far from fighting them, Corbyn would keep most Tory cuts in place.

Labour, it is true, plans large rises in tax. But the benefits will not go to the working and lower middle class. It wants to spend £11bn a year on abolishing tuition fees and restoring student grants. In other words, it wants to give handouts to high-earning graduates. Labour’s proposals for free universal childcare and free universal school meals meet the same objection: they are an expansion of the middle class welfare state.

Whatever postures our leaders take, this is the way it always rolls in Britain. Corbyn poses as being a radical left winger. May says she wants to serve the working class. But whatever they say all you can hear is the old street ballad

“ It's the same the whole world over:

It's the poor what gets the blame.

It's the rich what gets the pleasure;

Ain't it all a bloomin' shame.