A quarter of a century ago I went for a beer with a friend from East Berlin. We downed our frothy brew in the Märkischer Markt, a stroll from Checkpoint Charlie. Afterwards he stayed locked behind the Berlin Wall – as one of the majority of East Germans who had never been permitted to travel to the west – while I headed past the grim-faced guards to my parallel world of late bars and tinned tomatoes.

Our standing joke was that we did our beer-drinking under communism, but only I went to the loo afterwards under capitalism. By late 1989 that quip felt sour and the mood more bitter than I had experienced, living in the east on and off since 1983. Hungary had opened its border with Austria, and young East Germans were taking the opportunity of the first “mouse hole” since the Wall went up in 1961, even if it seemed likely to mean permanent estrangement from those they left behind. Fear, always nagging in a country that relied on the secret police to tamp down dissent, mingled with hopes of reform. Mikhail Gorbachev, the Soviet president, had come to East Germany and wagged a finger at the country’s ailing leader, Erich Honecker – and even after a nominal change at the top, the system looked resistant to perestroika, impervious to glasnost.

Had you asked me then, I would have said that whatever happened next, the Wall would be the last thing to go. But a couple of weeks later the house of cards folded and East Germany was on its way to becoming a footnote in history. Briefly, the illusion that the East could remain a separate country was preserved by the less pragmatic opposition groups, as well as Margaret Thatcher and François Mitterrand. I remember standing with Hans Modrow (by now the second transitional leader in two months) in his office in Dresden as cries of “Germany one fatherland” rose from the square below. He gave the shrug of a powerful figure glimpsing early retirement.

The Germany I return to now feels a long way from those days and the mood after unification in 1990, with its gnawing introspection and grumbly spats about the relative merits of Ossis and Wessis. Willy Brandt, the most eloquent of West Germany’s Social Democrats even at the end of his life, found a tone of gentle realism that eluded the bumptious government of Helmut Kohl when he prophesied: “What belongs together will grow back together.”

The thought recurs as you are whisked by the unified German train service through the forests of Thuringia and on to Bavaria – a journey that would have sounded fantastical to most East Germans. True, transitions are expensive and disruptive. But with patience and political will, they bear fruit. Leipzig, Dresden and Chemnitz are today clean, bustling cities: a far cry from their smogbound 80s gloom.

Brandt was more right than even he knew on another score: the export of political talent from the east to the unified Germany. When I glimpse Angela Merkel now, I can still see her as deputy spokesperson of a small right-of-centre opposition party, a blushing, clever young woman in dirndl-ish outfits who flushed under pressure, earning the nickname the Milkmaid. (If you prefer a more fiery brand of politics, Gregor Gysi– still the mouthy, witty leader of the far-left party die Linke – emerged from the east-and still thrives as the socialist most people would most like to have a drink and a fag with – a leftie prototype for Nigel Farage.)

All in all, Germany has done a pretty amazing job at “growing together” – a stable place where bad economic figures are offset by a decent employment record, where the centre-left government of Merkel’s predecessor took on labour market and welfare reforms of the sort many governments fudge, aided by constructive trade unions. What this Germany has not yet managed is to feel thoroughly at ease in the Europe that resulted from unification. Many guessed that an economic union involving Italy, Spain and Greece was an unconscionable risk. Its consensus politicians shrugged and allowed France to drive through a flawed political union whose troubles now reflect wishful thinking then.

A chancellor brought up in the Protestant modesty of the east relies too heavily on ultra-deflationary remedies, encouraging German savers and businesses to hoard cash, to the detriment of her own economy and with sluggish effects on the eurozone. Public investment levels are too low (a growing bugbear in the provinces, which look shabbier than they need to); and if mighty Germany can’t begin to address the lack of demand in the eurozone, who will?

The reticence points to a lack of ambition for life beyond the austerity years. And for all my admiration for the Milkmaid’s rise, the feeling that her era has become a bit stuck in a circular logic is inescapable. “When she speaks in the Bundestag,” says one critic, “the whole chamber is sedated, wondering what she has just said.”

In many ways, today’s Germany is a microcosm of its leader – proud to be dull and more limited in outlook and curiosity than a European powerhouse economy needs to be. To say that this is inevitable in the wake of two world wars has worn thin as an excuse for a country that has (in its western part) been a democratic model for more than 60 years, and scotched the dafter fears that unification would bring out some unspecified but latent chauvinism.

At a time when the world needs exemplars of democratic values to help tussle out the really tricky things, it does however risk being less than the sum of its parts. Not joining the rush to fight Saddam Hussein looked prudent for a country averse to military adventures, but silence on Libya and Syria, and the lack of any noteworthy policy on Islamic State and the Middle East, begins to look like an abdication rather than reassuring pacifism. Even when Germany did engage in Afghanistan, the notion that Germans were fighting was awkwardly disguised as “stabilisation deployment” (a salient exception to these evasions was Joschka Fischer, the former Green leader who backed the Kosovo intervention, to good effect).

Even the reticent Merkel has begun to wake up to the challenges of a surge of security problems, surprising Moscow by putting herself at the front of the argument for tough sanctions against Vladimir Putin over the Ukraine incursion. History throws up strange echoes. Putin, we might recall, was a KGB agent in Dresden in 1989 stuffing incriminating files into a furnace while Merkel was joining a (then illegal) pro-democracy group. Twenty-five years on, Germany is whole, free and a great country in almost every sense of the word. It need no longer be afraid to start acting like one.

Anne McElvoy will be taking part in a joint Guardian-British Museum debate on the lessons of modern Germany, chaired by Jon Snow, on Tuesday 28 October