Don’t despair. We may be living through an attempted rightwing revolution, but its foundations are rotten. There may be a counter-revolution, as there is after every revolution, and it will be built on much firmer ground. The charlatans may be in control in both Britain and the US, but their time is limited. Their programmes are self-defeating and destructive and they do not speak to the dynamic and increasingly ascendant forces in both our societies.

What has happened in the US after the atrocities in El Paso and Dayton is instructive. It is a tipping point. The National Rifle Association may tell Donald Trump repeatedly that any attempt at gun control will not fly with his political base, but Trump can read the runes. For the Republicans to become the party in de facto defence of what has suddenly become crystallised as white supremacist terrorism would be electoral suicide. The president has to move, not least because, faced with this reality, even his base is shifting. Too many Americans now fear becoming the victims of random murder.

Few can dispute that, astonishingly, while the US has 5% of the world’s population, it has 35%-50% of civilian gun ownership, a trend that simply has to be reversed. Within a decade, I am sure, the debate will move on, as white supremacists continue their killing spree, from hardening background checks to debating the constitutional right to bear arms. This must and will happen and it will highlight the marginalisation of rightwing republicanism. And when the political wind changes in the US, it also changes in Britain.

Trump in the US and Boris Johnson in the UK are the extreme culmination of what Reagan and Thatcher began 40 years ago. It started as a legitimate if contestable desire to reframe the postwar settlement, limit the state, promote business and individual self-reliance. But as the great political scientist Samuel Beer famously argued, it was, paradoxically, supported culturally by the individualism, anti-state instincts and nonconformism of the Woodstock generation.

Forty years on, continued rightwing political ascendancy has morphed into today’s menacing rightwing ideologies. The role of US republicanism as the libertarian champion of guns is matched by the descent of the Conservative party into English nationalism, with a no-deal Brexit as its talismanic policy, even if it means breaking up the UK. But a no-deal Brexit will become an inflection point for a parallel fightback in Britain. The devastating economic and political consequences – a long recession, a broken housing market, collapsed sterling, chronically unfair trade deals – will inevitably raise the question of how it ever happened. Suddenly, the British constitution, the long sleeper issue in British politics, will become the new political battleground.

Britain is almost alone in having no written constitution. Whoever commands a majority in the House of Commons can do what they like without constitutional constraint – hold a referendum transforming Britain’s treaty obligations with no requirement for a super-majority or ignore a no-confidence vote in the House of Commons for long enough to deliver a no-deal Brexit. The constitution does empower the monarch to assert fair play and the public interest, but a non-elected head of state can never actually act.

This is no longer sustainable. We needed the Queen to insist that a referendum as important as that on EU membership required a super-majority; we will need her to sack Boris Johnson if he tries to stay in office after losing a no-confidence vote or to time a general election for after 31 October, so bypassing the Commons to effect a no-deal Brexit. But she knows she can only act politically once. If she sacks Johnson she makes enemies of the English nationalists; if she doesn’t, she makes enemies of everyone else. Either way, her legitimacy is ruined. Only an elected head of state has the legitimacy to hold the ring at times like these – facing electoral consequences if they get it wrong.

The case for the EU will be as an agent for Europe-wide sustainability

The question of how we want to be governed is no longer abstract: it goes to the heart of giant new cultural forces that want good government. The generations championing individualistic hedonism and social atomisation – the unwitting cultural accomplices of the right – are being succeeded by the Extinction Rebellion generation who are rediscovering collectivism. As the UN Intergovernmental Panel on Climate Change last week spelled out, how we all collectively behave, in particular the food we consume, will be crucial in determining the future of life. Livestock are environmentally dangerous. Around the world, there is a boom in substitutes for meat, as consumers switch to plant-based diets – including 39% of US consumers.

Nor is it just eating. Decisions on everything from the use of plastics to the frequency of flying have a collective and awesome impact on everyone, particularly those young enough to expect to see the end of the century.

Companies are finding their record on sustainability is under the microscope as never before. Whether public utilities or global multinationals in the fossil fuel or food businesses, no one escapes the new requirement to do business sustainably. This dynamic is driving the imperative to reshape capitalism around stakeholder principles.

But only so much can come from pressure from below: governments must act from above and how we are governed is moving to the centre of the political debate. Wise and activist government – checked, balanced, accountable, sufficiently federal to accommodate the demands of Scotland, Wales and Northern Ireland and serviced by an impartial civil service – is going to be crucial in creating a greener society, a reformed capitalism and reduction of disfiguring inequalities.

The need for such governance will extend internationally. The case for the EU will increasingly be as an agent for Europe-wide sustainability: the ESU – European Sustainable Union. Its actions will become the global standard-setter for the environment. If we leave the EU, at the heart of the case for rejoining will be the need to make the greening of our continent a common cause.

So don’t despair. The no-deal Brexiters do not have the force behind them, any more than does Trump. They are losers, on the wrong side of history. Better people will enter politics. Old parties will be rejuvenated: new ones take life. There will be a counter-revolution – it’s already in the making.

• Will Hutton is an Observer columnist