Enter the disturbing special exhibition that has recently opened in Berlin’s German Historical Museum and you are immediately confronted with a series of bleak statements: “Liberal democracy cannot be taken for granted any longer … Authoritarian parties are even gaining strength in countries with a long democratic tradition … The public’s trust in liberal democracy seems to be waning in Germany as well.”

The task of this outstanding museum is to tell the story of the nation’s past. But its new exhibition about the post-first world war Weimar republic – which runs until September – is explicitly about both the past and the present. And its scope is deliberately not confined to Germany, but extended to countries such as Britain.

The Weimar republic, created amid the chaos of defeat, was Germany’s first sustained effort at government by parliamentary democracy. It was destroyed in 1933 after the takeover by the Nazis. Today, the Weimar period is often synonymous with dizzying hyperinflation and transgressive sexuality. But there was a lot more to those years than edgy Berlin cabarets and wheelbarrows full of worthless banknotes. Above all, Weimar was the ultimate stress test of representative liberal democracy in the face of nationalism, racism, violence and populism.

The Berlin exhibition is not just about how democracy unravelled in the decade that followed the first Weimar elections in 1919. It is also about whether something like that may again be happening across Europe in 2019. It consists, indeed, of two umbilically linked shows. One is about the stormy Weimar period itself; the other is in the form of a participatory laboratory on how democracies can cope with similar challenges today. It is not a comfortable experience.

A shopkeeper counts money in a tea chest during Germany’s hyperinflation era in 1922. Photograph: Hulton Archive/Getty Images

The Europe of 1919 and the Europe of 2019 are massively different from each other. Germany in 1919 was exhausted after four years of brutally destructive war. Its imperial political institutions had collapsed. It was surrounded by hostile victorious powers. Unemployment was terrible. The prospect of a German social revolution that would eclipse even that of the Bolsheviks in Russia was extremely real. Political instability and violence were endemic.

Yet the more you proceed around the Berlin exhibition, the more you are compelled to ask yourself difficult 21st-century questions. Weimar Germany was a society and a system built on the edge of a volcano. But it may not have been quite so fundamentally different from our own society and system as the supporters of liberal democracy used to assume before the events of the last decade. This is not a prelude to claiming that Germany – or Britain – is mechanistically sleepwalking towards fascism in the Nazi sense. And I do not pretend to be an expert on German history. But some of the parallels with and some of the lessons of the Weimar period should be taken very seriously. If they are not, there is a risk that political trust will continue to unravel in ways that further weaken our ability to effectively confront problems such as Brexit, inequality and climate change – even if we stop short of the kind of catastrophe that engulfed Germany nearly a century ago.

The Weimar parliamentary system, for instance, required political parties to cooperate to deliver publicly supported compromise. That did not happen, and both the left and the right were to blame for it, although in the end it was the centre-right’s readiness to ally with Hitler that opened the door. Instead, Weimar was overwhelmed by a potent narrative of national betrayal and the allure of a strong autocratic and illiberal alternative form of government rooted in racism and fear of others. Political violence, including the assassination of politicians, was at the core of the destabilisation of the 1920s too.

Theresa May and Jeremy Corbyn: ‘Parties of the left and the right that could have cooperated to help uphold public trust in the wake of the referendum have not done so.’ Photograph: Pool

It would be trite to draw the modern parallels too tightly. Nevertheless, there are similarities with today’s Brexit-derived politics that cannot just be dismissed. Here, as in Weimar, extra-parliamentary politics exerts great influence. Here, parties of the left and the right that could have cooperated to help uphold public trust in the wake of the referendum have not done so. Here too, large parts of the centre-right are intimidated by, and increasingly share, many of the prejudices of the far right.

Here, also, there is a surging narrative on the right about national betrayal, which seems likely to score heavily in the European polls next week. Here, more than half the public, according to a recent Hansard Society survey, says it supports “a strong leader willing to break the rules”. Here, racism of various kinds is on the increase. And here too we have experienced political assassination (also from the far right), public threats of violence against politicians, and official warnings that MPs are no longer safe.

At least in the Weimar republic there were thousands who stood up to be counted for the parliamentary system. One of the most moving photos in the Berlin exhibition is of an immense “Rally for the Republic” following the assassination of foreign minister Walther Rathenau in 1922. In Brexit Britain, though, few rally for the parliamentary system. Contempt for parliament has become the public’s default setting. Representative democracy is on the back foot. Next week’s elections are set to push it back further.

All this feels as if it is about something much bigger than the need for electoral reform, desirable though that would be. This week, at the launch of a new book of essays called Rethinking Democracy, of which he is co-editor with Andrew Gamble, the former Labour MP Tony Wright went to the unstable nub of the matter. “We lost the referendum,” he said. “But we lost the democratic argument too. The argument for democracy was won by the leavers.” What is needed is a change of culture, says Wright.

Theresa May, seeking to bring back her Brexit bill to MPs next month with little prospect of success, seems fated simply to add another layer to the bedrock of contempt by doing so. In Germany a century ago they fell out of love with parliament, with terrible consequences. In Britain today we seem to be doing the same, and without grasping what could be at stake.

• Martin Kettle is a Guardian columnist