This taut and engrossing new play, an original adaptation of Franz Kafka's In The Penal Colony, sees a cosmopolitan traveller arrive on an isolated prison island. He's there as a guest – to learn about the eponymous "apparatus", a complex device overseen by a proud and protective officer. The officer speaks of the apparatus with reverential devotion, and she talks in the same tones about her now-dead mentor: the former commandant, the inventor of the apparatus, and the father of this authoritarian regime.

It's obvious from the start that we're looking at a death chamber – but the grotesque details of the upcoming killing emerge only as the officer speaks. She's played by Emily Carding, best-known for her one-woman version of Richard III, who makes this fascist-uniformed executioner seem both chilling and lost. She exhibits the apparatus with awe-struck pride, like a real-world fanboy showing off his brand-new iPad – but there's something we feel she's hiding, from herself as well as from us.

Matt Hastings is quietly impressive as the traveller; ever-present but rarely speaking, he eloquently channels the audience's discomfort through posture and expression alone. It can't be easy to build a character from so few lines, yet Hastings's very presence crackles with unspoken tension, growing electric later on. There are sinister power-plays at work here, as well as some fundamental misunderstandings – and it's clear that this meeting of opposites cannot possibly end well.

Completing the quartet on the stage, Luis Amália plays a condemned man, and Maximus Polling the soldier who guards him. Adversaries at first, their behaviour gradually changes; the soldier is no admirer of the officer, and the naïve prisoner clearly amuses him. Their surreptitious antics offer much-needed relief, nicely balancing the weight Carding's intensity – and while playwright Ross Dinwiddy takes a significant liberty with Kafka's original ending, the adjustment is a neat and effective one.

In truth, though, this is all about the officer: about the poisonous effect of too much self-belief, and the dangers of unquestioning loyalty. At one point, the traveller remarks that he finds her conviction moving; and thanks to Carding's nuanced portrayal, I had to agree. It's a scary thought, but if I'd lost attention for a moment – if I'd forgotten, just for a second, what the apparatus was actually for – then I might have stumbled into believing it was not just poignant, but admirable.

And that matters, because Kafka's nightmarish apparatus is a chilling analogue for something real. Within thirty years of the story's publication, Nazi ideologues had used their own machinery to slaughter millions of those they deemed enemies. Or perhaps, in these less extreme times, it represents the apparatus of the state; as we left the theatre, the people behind me were discussing Theresa May's now-notorious "hostile environment" for immigration. Wisely, Dinwiddy doesn't highlight any of these parallels. He doesn't need to; they are obvious.

Apparatus isn't always comfortable to watch, but it's a thought-provoking and highly relevant production, a smart and economical adaptation of Kafka's work. Carding is mesmerising in the starring role, but her success depends on the support of a talented and faultlessly convincing cast. Don't miss the chance to see this when it returns to the Rialto later in the Fringe.