The appearance in Cannes of Asghar Farhadi’s interesting if contrived drama Forushande, or The Salesman, is a moment to ponder if a new genre of world cinema is being born: The Haneke/Antonioni Shock Event. Some nice, complacent middle-class people tootle along with their lives and then they’re sideswiped by a horrible event — mysterious, anonymous and malevolent —which shatters their calm and cracks open the carapace of their daily routine. It reveals the raw nerve of guilt and shame within.

Both Cristian Mungui’s Bacalaureat and to a lesser extent the Dardennes’ The Unknown Girl here in Cannes were H/A shock events: all about sexual assault, middle-class complicity, barricaded comfort, people buzzing on doors to be allowed in, or not allowed in, with CCTV footage revealing glimpses of marginalised lives which are scary to the overclass. The Salesman is beginning to fit a certain pattern, and however well-managed it undoubtedly is, it is starting to look like a mannerism.

Farhadi’s brilliant films A Separation (2011) and About Elly (2009) had something of Haneke and Antonioni respectively, though in my view The Salesman is closer in many ways to his Fireworks Wednesday (2006) and it starred the female lead of this film, the excellent Taraneh Alidoosti. That movie had the same idea of a living space being disrupted, and the resulting intimate discomfort and upheaval causing a good deal to be revealed about the relationships of the people who live there. It was less showy and more subtle than The Salesman.

This story is about a happy middle-class couple in Tehran: Rana and Emad, played by Alidoosti and Shahab Hosseini. He is a teacher and she stays at home, and there are some thoughts about starting a family. But more than this, they are talented members of a semi-professional theatre group, and putting on a production of Arthur Miller’s Death Of A Salesman, with Emad playing the failed salesman Willy Loman and Emad playing Willy’s wife Linda: both putting on grey wigs and makeup and playing older, careworn characters. Just as the run starts, they are forced to move out of their apartment because the whole building appears to be collapsing due to construction faults — Farhadi creates a very disturbing scene in which cracks snap across window panes. An imminent Titanic catastrophe.

Asghar Farhadi at the 2013 Cannes film festival Photograph: Anne-Christine Poujoulat/AFP/Getty Images

The couple eventually find an alternative apartment, set up for them as a favour by a fellow cast member. But they only find out too late this flat was once inhabited by a young woman who appeared to work as a prostitute, and unsavoury people have got used to calling round at all hours of the night. Rana one night buzzes open the outer door thinking that it must be her husband. But it isn’t.

There is a formal pleasure and fascination in the way Farhardi juxtaposes the grim, complex scenes of the couple’s real life with the scenes from Arthur Miller’s play, with its formal demonstrations of emotion. Messy realism and classically proportioned tragedy are set down, side by side. Emad himself is a restrained, cerebral guy, but it could well be that starring in Miller has given him a conceited, dramatic, morally heroic view of himself. Willy Loman wondered in anguish what sort of a man can’t give his wife and family the good things in life. Emad is wondering what sort of man can’t protect his wife from assault. Cleverly, Farhadi allows his audience to make assumptions as to where the Willy Loman parallel lies, and then upends them in the film’s final minutes — yet in such a way that the new connection is a little glib.

It’s a smart, ambitious film, but very plot-dependent on one of Emad’s pupils having a father who works in the motor vehicle licensing department. The Salesman is trying harder for a bigger effect and bigger payoff than his previous films, and it doesn’t have the enigmatic quality of A Separation. In fact, its revenge-justice theme almost reminded me of Denis Villeneuve’s crime melodrama Prisoners (2013).

Having said all this, the sheer IQ of Farhadi’s film-making makes this very watchable; only a film-maker of his confidence could have found space for a audacious bit of comedy: exhausted in class, Emad falls asleep and the kids pose for cheeky selfies around his snoring face. The Salesman is a well-crafted, valuable drama.