Powder Her Face is a darkly comic opera written in 1995 by Thomas Adès with a libretto by Philip Hensher inspired by the life and times of Margaret, Duchess of Argyll. Margaret was a famous British socialite, who burst on to the covers of newspapers and society magazines in 1930 as debutante of the season. In the decade that followed, she became one of the most photographed women in the world and a style icon for millions.

However, it was very different photographs that would lead to her notoriety, and cement her place in the public mind as the "Dirty Duchess". In 1963, she went through a scandalous divorce, as her husband, the 11th Duke of Argyll, attempted to prove her infidelity. Rumours leaked from the courtroom daily. Did she really keep a pornographic diary detailing her sexual exploits, complete with star ratings for every lover? Did she really sleep with Hollywood movie stars and cabinet ministers? Did she really have more than 88 lovers? But the most damning evidence against her was a series of Polaroid photographs that were stolen from her personal possession and presented in court.

Taken using a self-timer at her Mayfair home, the pictures showed her performing fellatio on the so-called "headless man", whose identity was a mystery due to his face being just out of shot.

The duchess is a figure who has always provoked extreme reactions, and the brilliance of Adès and Hensher's opera lies in the way it constantly challenges its audience to consider what they think of her. On the one hand, we are shown the portrait of a pretty reprehensible human being. Vain, manipulative and snobbish in the extreme, the duchess embodies everything that makes one recoil from the British upper class. But at the same time, one can't help admire, or at least revel in, Her Grace's bad behaviour. Her voracious, unstoppable appetite for life, and her status as a sexual outlaw (she lived at a time when it was fine for a duke to take a lover, but not for "a lady" to do the same) might make us wish we had her bravery, and quite frankly, her energy. And although what happened to her in court might seem very remote from our daily experience, working on the opera has made me find many unexpected connections between the duchess's story and life in 2014.

The Duchess of Argyll in 1963, returning from France after her husband won the divorce case against her. Photograph: Bettmann/Corbis

Back in 1963, the duchess's sexually explicit Polaroids seemed a uniquely upper-class perversion. In the 1950s – when the pictures were taken – Polaroid cameras were not commercially available in the UK. Before the arrival of this strange new technology, the idea that people could freely take private pictures of themselves engaging in sexual activity was unheard of. Only the wealthy upper echelons of society could have access to these "instant photographs" that made taking private and intimate shots possible, but only the rich and famous would also have the gory details of their divorce trial splashed over newspapers. The duchess's very public disgrace and downfall was a tragedy that seemed exclusively the preserve of the super rich.

Nowadays, however, the majority of us hold in the palm of our hand the technology to not only photograph or video our bad behaviour – be that illegal, sexual or just plain stupid – but also the capacity, willingly or otherwise, to disseminate it worldwide in minutes. Today, a whole generation is growing up only ever knowing a world in which the duchess's very public form of downfall is readily available to everyone, 24 hours a day. Since the 1960s, the technology may have advanced, but human nature and its endless capacity to judge and ridicule is as backward as it's always been. It's not so hard to see the titillating and moralising media coverage that accompanied the duchess's divorce trial as an early 60s version of that depressing internet phenomenon, "slut shaming".

And, these days, you don't even need to be a celebrity or a member of the aristocracy any more – anyone can face public vilification. We can all think of internet superstars who were complete unknowns up until the day they let their frisky dog off the lead in a deer-filled park, or tweeted a horrendously misjudged comment while boarding a business flight to South Africa.

In many of these cases, the victims of widespread scorn and derision were architects of their own downfall, and so it was with the duchess. The pictures of her cheating on her husband were, after all, selfies. But then again, are we all immune to moments of duchess-like self-delusion and narcissism? Our Facebook walls and Twitter feeds are our personal society magazines, for which we act as our own publicists, stylists and, frequently, photographers. We are all celebrities in our own worlds, shaping our public personas through judiciously uploaded photographs and pronouncements in 140 characters or less. When, for example, was the last time you posted a selfie of yourself online? For me? Last Thursday, Your Honour.

Directing a new production of Adès's opera for English National Opera has made me reflect on my own life as much as the lives of the rich and famous. Perhaps the duchess, and the fate that befell her, are not so remote from our lives today. Will that realisation stop us gawping at celebrities and passing judgment on their lives? Certainly not. But perhaps we shouldn't be so surprised if that same treatment gets meted out to us. If today everyone is a kind of celebrity, then everyone can have their public fall from grace.

• Powder Her Face is at Ambika P3, London from 2 April.

• This article was amended on 31 March 2014. An earlier version of the top photo caption misspelled Mary Plazas's name as Maria Plazas.