“Brazil – where the nuts come from” became the most famous line from the Victorian comedy Charley’s Aunt; until recently, an equivalent cliché might have been “Venezuela – where the oil comes from.” Not any longer, or at least not in the quantities Venezuela formerly produced.

It has taken a perverse ingenuity to reduce the output of Venezuela, a country sitting on top of 55,000 square kilometres of crude oil, to a relative trickle, but that is the crowning achievement of the Great Bolivarian Revolution pioneered by the late Hugo Chavez – denominated in classic revolutionary style “the Comandante” – and carried forward even more incompetently by his successor President Nicolas Maduro.

In recent years commentators have been forecasting severe problems for Venezuela as a consequence of the global slump in oil prices. But that crisis has been gravely compounded by the decline of production capacity as a result of Marxist mismanagement. In 2002 the government sacked many of the 20,000 oil industry technologists because they were considered politically dissident.

The state oil company PDVSA is run by party hacks loyal to the regime who tell their masters what they want to hear and whose chief preoccupation is to conceal from the outside world the collapsing state of the industry they have ruined. The PDVSA talks a good game, but it is now fooling nobody. Back in 2011 its then president claimed oil production would reach 4 million barrels a day by 2015, rising to 6 mbd by 2019. In reality, in 2015 it averaged 2.65 mbd. Earlier this year OPEC reported it was down to 2.52 mbd as the decline continued.

The problem is that revenues from the fat years, instead of being partly ploughed back into maintenance of infrastructure and modernisation of technology, were squandered on grandstanding handouts to the public, to buy Chavez popularity. Many of the remaining expert technologists employed by PDVSA have migrated to other oil-rich states such as Saudi Arabia or Canada, disgusted by the mismanagement and cronyism in the Venezuelan industry.

But the writing was on the wall long ago. As far back as 2009 the appointment of a Minister for Electricity Shortages, the only such post in the world, in an OPEC member state, signalled the emerging consequences of Chavez’ much-vaunted “21st-century socialism”. The IMF has estimated that the true rate of inflation in Venezuela (the government now routinely falsifies economic statistics) last year was 275 per cent and expects it to reach 720 per cent this year, though an alternative estimate by Bank of America suggests it could exceed 1,000 per cent.

Venezuela regularly tops the Global Misery Index and the Heritage Foundation has classed it as a “Repressed” economy. Most foodstuffs and, notoriously, items such as lavatory paper, are virtually unobtainable. Healthcare has crashed to Third World standards and many Venezuelans have died unnecessarily due to lack of drugs and basic medical facilities. The Bolivarian Revolution has proved lethal for Venezuela’s poor, whom it was allegedly intended to help. But not everyone is poor: the political elite – both government and individual functionaries – was exposed last year as the third largest customer of HSBC’s Swiss accounts, with deposits totalling $14.8bn.

The regime is maintained in power by a politicised army, a 120,000-strong Marxist militia and gangs of government supporting thugs. Media censorship is intensive. Last December the opposition trounced Maduro’s ruling PSUV in a general election where the swing against the government was so strong it gave his opponents a “supermajority” of 112 parliamentary seats out of 167.

This would have enabled the opposition to expel Maduro from office, but in a “judicial coup” the Supreme Court disqualified three opposition deputies, preventing the supermajority. Now the opposition is trying to hold a referendum to remove Maduro, but the National Electoral Council claimed more than 600,000 signatures on the petition were invalid – hardly a plausible claim, considering the size of the recent anti-government vote – and Maduro has asked the Supreme Court to strike down the referendum proposal.

Clearly, after 17 years of socialist rule, the Bolivarian Revolution is discredited and beleaguered, with even slum-dwellers voting against the PSUV. The wonder is that after every conceivable form of socialism has failed – Leninism, Stalinism, Maoism, even social democracy – people can still be induced to embrace Utopian egalitarian theories in the face of bitter experience.

There are elements of dirigeism, bureaucracy and interventionism in the structures of the EU and even the United States under Obama has, for the first time, adopted elements of the great delusion. It is capitalism’s responsibility to regenerate itself morally and dissipate the destructive mirage of socialism once and for all.