Thirty years ago this coming Monday, a vast crowd of East Germans streamed into Alexanderplatz in then-divided Berlin to protest against the regime they lived under. The German Democratic Republic was crumbling around them. Erich Honecker, the reviled leader of the GDR, had been forced out. Thousands of people had already fled. Five days later, after a party functionary mistakenly announced that anyone who wanted to leave the country was free to do so, hordes began to clamber over the Berlin Wall.

As journalists observed – and numerous playwrights have realised – the events of 4 November 1989 were so dramatic, they would have been impossible to script. Who would believe a play in which a country gave up the ghost without a shot being fired, and that this helped bring about the end of European communism? All because an apparatchik fumbled his lines.

What is intriguing is that the collapse of East Germany was, in many ways, a piece of theatre. The Alexanderplatz demonstration, one of the largest in GDR history, had been planned by actors and directors from leading East German theatres. They invited playwrights and actors to address the crowds, alongside dissidents and politicians. They even had a baddie: the former deputy head of the Stasi secret police spoke – and was booed.

Countdown to collapse … playwright Heiner Müller, who was once banned, at the Alexanderplatz protest. Photograph: DPA Picture Alliance/Alamy

For many, the rallying cry was “Wir sind das Volk!” or “We are the people!” – a line from Danton’s Death, Georg Büchner’s 1835 drama about the French Revolution. Adding to the atmosphere of insurrection that autumn – or seeking to give reality a nudge – several theatres were staging the play.

I came across these stories a few years ago and didn’t know what to make of them. It didn’t seem surprising that theatre-makers had been involved in the protest movement. This was the case in other eastern bloc countries: in Czechoslovakia, the dissident playwright Václav Havel even became president. Theatre has often stood in for politics in repressive societies, a debating chamber in another form. And as the old joke goes, in Germany theatre is taken more seriously than real life.

But it seemed a stretch, particularly from the perspective of Britain 30 years on, where political theatre often seems a sideshow to the turmoil of real events. It left me with questions. What was it like to make theatre in one of the most surveilled societies on Earth? Why did writers and directors stay in the GDR when so many others fled? Did theatre-makers really hasten the fall of the Berlin Wall?

These questions propel Power Plays, a documentary I have made with BBC Radio 3 that begins with the curious paradoxes surrounding culture in the GDR. Founded in 1949, the “People’s Democracy” was determined to assert itself as a shining cultural beacon. An early triumph was Bertolt Brecht’s return from exile the previous year. In time, his Berliner Ensemble became mainland Europe’s most influential troupe. Many writers, directors and actors threw their weight behind the great socialist project that was the GDR, and the state was only too happy to help.

Influential … a performance of Mr Puntila and His Man Matti in the Berliner Ensemble theatre in 1949. Photograph: Ullstein Bild via Getty Images

East Germany eventually boasted of having 68 theatres for a population of only 16 million – almost certainly the densest theatre network in the world. Budgets were lavish, yet ticket prices were kept low, to attract working-class audiences. After all, true theatre was Volkstheater – theatre by and for the people. “It was an extremely exciting time, so much fire and hope,” the dramaturg Maik Hamburger, now 88, said. “All of us in theatre felt we were doing genuinely important work.”

However, the regime didn’t always see that work in the same light, particularly when it strayed from socialist-realist principles. Under the guise of “cultural planning”, officials put pressure on producers to alter scripts or avoid them altogether. The Stasi snooped on rehearsals; self-censorship played a part.

Reprisals could be savage. In 1961, a comedy called Die Umsiedlerin (The Resettled Woman) dared to present people in power in a less than sympathetic light. Its writer, Heiner Müller, was banned for several years and its director, BK Tragelehn, was sent to work in a coal mine for six months. You had to develop a sixth sense, Hamburger told us: “After a while, you stopped being naive. You became more cunning.”

While GDR audiences were certainly subjected to plenty of Marxist productions featuring lantern-jawed steel workers, elsewhere texts were subtly tweaked to make under-the-radar points. Renate Ziemer, Müller’s secretary, recalled actors gesturing silently at pivotal moments towards the theatre ceiling, where the Stasi would have microphones secreted. Hamburger even managed to sneak a dig into a 1971 production of A Midsummer Night’s Dream, translating the character Wall’s name as Die Mauer (the Wall). The audience got the joke.

Legend has it Frank Castorf got away with his scandalous shows because his Stasi informant protected him

One remarkable tale concerned the director Frank Castorf – these days a legendary figure for his years running Berlin’s Volksbühne theatre, but in the early 1980s just starting out. Appalled by his wildly ripped-apart productions, the authorities hit upon the wheeze of making him artistic director in the one-horse northern town of Anklam, hoping he’d sink into obscurity.

Instead, he turned Anklam’s theatre into a cult destination, with Berliners trekking for hours to catch the latest scandalous show. Legend has it that Castorf got away with it because the Stasi informant watching him (a prompter operating under the codename “Dario Fo”) fabricated reports to protect him.

“It’s difficult to explain,” said Hamburger when asked why, given all these pressures, he didn’t flee, as others did. He shook his head and sighed. “I was always optimistic, somehow. I thought it would get better.”

There was, in all this, an overriding irony. “The GDR could be a great place to make theatre,” said the Oxford academic and GDR expert Emily Oliver. “Resources were essentially unlimited. Actors could actually get lifetime tenure in companies. If you’d made it through the ranks and were working with a good ensemble, there was a strong incentive to stay.”

Sent to a one-horse town … theatre director Frank Castorf in 1989. Photograph: Ullstein Bild via Getty Images

For some, being part of a surveillance state may even have had a curious appeal: participating in a high-wire act where a single misstep could end in disaster was dangerous, but also thrillling. Stasiland, to use the title of Anna Funder’s chilling book about the era, was itself a kind of theatre. Müller seems to have sensed this, drily remarking that “for a dramatist, a dictatorship is more colourful than life in a democracy”.

In the end, the artists who led the protests were taken unawares by the speed of the GDR’s fall. Many had hoped to reform their country, put it back on the path to cultural utopia – not deliver a death blow. Most East Germans just wanted better lives, the chance to travel, hard currency and the right to vote.

As Germany moved towards unification and East Germany’s economy collapsed, plenty of theatre people lost their jobs, others their sense of purpose. Still, while the GDR’s last days didn’t go according to script, few of the people we spoke to have any regrets. “We were making history,” said Hamburger. “Fighting, hoping. I wouldn’t have missed that for the world.”

• Power Plays: Theatre in the GDR is on BBC Radio 3 on 3 November at 6.45pm, and available on BBC Sounds.