When he published the second edition of the greatest of political satires, Gulliver’s Travels, Jonathan Swift prefaced it with an outraged letter from Gulliver himself. His chief complaint was that his book had failed to change anything: “instead of seeing a full stop put to all abuses and corruptions, at least in this little island, as I had reason to expect: behold, after above six months warning, I cannot learn that my book hath produced one single effect according to mine intentions…” The joke is not just on Gulliver, but on Swift himself and indeed on the art of satire. When did its mockery ever put a full stop to the abuses it attacks?

It seems safe to assume that Ian McEwan does not suffer from Gulliver’s delusions. His short, sharp satire on Brexit is not going to stop it, or to change the mind of any reader who supports it. The classical idea that satire can reform the polity has even less purchase now than it had in Swift’s 18th century. Its mechanism was shame: the rulers would see an image of themselves in the distorting mirror of the writer’s fable, feel ashamed of themselves and resolve to be better. But ours is an age of political shamelessness. In the era of Donald Trump and Boris Johnson, the rulers create their own grotesque self-parodies and flaunt them before their adoring fans.

In that context, McEwan has more limited (and realistic) ambitions. The Cockroach aims not to persuade or in any profound sense to critique. It is written to comfort and entertain those who already believe that the Brexit project is deranged. And even in that McEwan faces a formidable challenge. Brexit has such a camp, knowing, performative quality that it is almost impossible to inflate it any further. How do you make a show of people who are doing such a fabulous job of making a show of themselves? McEwan manages to do so with great style and comic panache.

Last year, someone put online a brilliant mock-up of an old orange Penguin paperback cover: Brexit by Franz Kafka. The cockroach of McEwan’s title is of course a version of the giant insect into which Gregor Samsa awakes to find himself transformed in Kafka’s novella The Metamorphosis. His opening line echoes Kafka’s: “That morning, Jim Sams, clever but by no means profound, woke from uneasy dreams to find himself transformed into a gigantic creature.”

The great political project that is roiling Britain is as elaborately bonkers as those Gulliver encounters

But in truth the parallel is misleading. It is not just that in McEwan’s case the metamorphosis is reversed: Sams is not a human transmuted into an insect but a cockroach who has taken over the body of the prime minister of the UK. (The room in which he awakes is in 10 Downing Street.) It is also that this fable is much more Swiftian than Kafkaesque. In The Metamorphosis, the story is really about the strangeness of everyday life and the human capacity to deny it. The world of The Cockroach is more like one of Swift’s parallel universes where political and intellectual idiocies are not so much reduced to absurdity as magnified into towering follies.

Comparing one’s political opponents to cockroaches is a toxic metaphor with a nasty political history and it is hard to read McEwan’s novella without a degree of discomfort. Jim Sams is essentially a Theresa May (derided by his backbench zealots as “not a true go-it-alone man”) who metamorphoses into a Boris Johnson, a gung-ho go-it-alone man. (McEwan is sufficiently up to date to have him promise to proceed “do or die” and his adviser speculate that he could “prorogue parliament for a few months”.) We soon learn that all of his cabinet bar the patrician foreign secretary are also cockroaches in “superficial human form”. This is dangerous terrain, and McEwan just about gets through it by stepping lightly and moving fast.

What keeps him going is his brilliant answer to the question of what could possibly be more absurd than Brexit. He is far too clever to try to compete directly with the real goings-on in Whitehall and Westminster. Instead, the great political project that is roiling Britain is as elaborately bonkers as those that Gulliver encounters on his third voyage: extracting sunlight from cucumbers or softening marble to make pillows. McEwan’s parallel universe version of Brexit is the cracked theory of Reversalism, in which the flow of money is reversed: workers have to pay their employers but in turn are paid for shopping. Trade will function by exporters giving Britain money to take their goods; Britain will in turn pay other countries to import its products and services. The only problem being that the only other country that agrees to this reversal is St Kitts and Nevis.

McEwan elaborates this great scheme in prose so finely wrought that the plan seems to have some genuine gravity. And this in turn makes it very funny. He cannot hope to laugh the terrible reality of Brexit out of existence, but McEwan’s comic parable at least provides some relief from a political farce that has long gone beyond a joke.

This review is from the Observer

• The Cockroach by Ian McEwan is published by Vintage (£7.99). To order a copy go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £15, online orders only. Phone orders min p&p of £1.99