I’ve never been inside a British women’s prison, but judging by the recent trilogy of Shakespearean productions originating at London’s Donmar Warehouse, I can only assume that their cultural programs are fantastic. Director Phyllida Lloyd’s staging of The Tempest imagines that the play is being performed by an all-female cast of inmates. And as with Julius Caesar and Henry IV, the previous productions also given their American premieres at NYC’s St. Ann’s Warehouse, the approach has its pluses and minuses.

Once again the ensemble is headed by the formidable Harriet Walter (currently seen in Netflix’s TheCrown), giving a superb performance as the magician Prospero, Duke of Milan, exiled for years on an island after having been deposed by his jealous brother, Antonio. Except that Walter is technically not playing Prospero, but rather an inmate named Hanna, serving a 35-year prison sentence for her role as the getaway driver in a politically motivated bank robbery that resulted in the deaths of two policemen and a security guard. (If the details sound familiar, it’s because the character is inspired by the real-life case of Judy Clark, a former member of the Weather Underground, currently incarcerated for a 1981 Brink’s robbery.)

This Tempest hews closely to the established format of Lloyd’s all-female trilogy. Before the performance begins, the jumpsuit-clad, chained cast is marched through the lobby by menacing prison guards, who then escort us into the theater. The playing area, ringed by detritus including dozens of empty plastic bottles, resembles a gymnasium, although one that, in this case, contains such unlikely paraphernalia as a steel drum.

The multi-ethnic cast proceeds to deliver a stripped-down version of Shakespeare’s classic — the performance runs a relatively brief 105 minutes — occasionally interrupted by jarring reminders of the circumstances under which it is being performed. Thus, when one of the characters talks about “freedom,” a snarling guard interjects, “Freedom? You wish! This is not ‘Escape from Alcatraz!’”

The action includes a wild dance party, with the frequent musical interludes featuring calypso-tinged compositions by famed singer-songwriter Joan Armatrading. Miniature flashlights allow audience members to contribute to a haunting lighting effect, and the performers bring out giant balloons on which well-known advertising logos are prominently projected. And, not surprisingly, the opportunity for a Donald Trump joke has not been neglected.

The play itself tends to suffer in the process, despite terrific performances including Jade Anouka’s Ariel; Sophie Stanton’s Caliban; Sheila Atim and Leah Harvey as the endearingly lovestruck Ferdinand and Miranda; and especially the commanding Walter, exuding a world-weary gravitas that serves both her characters perfectly. But despite the actors’ fine efforts, the meta-theatricality of it all — winked at when one of the characters complains about “postmodern shit” — proves more gimmicky than enlightening.

The most effectively resonant moment comes at the conclusion, after, as Prospero puts it, “our revels now are ended.” As most of the other inmates depart — presumably, they’ve all received pardons — Walters’ Hanna is left alone in her cell, reading a book. Prospero, it seems, possesses the magic to free others, but is doomed to remain a prisoner himself.