All countries and societies have their myths and Dunkirk is one of Britain’s most enduring, and although in its way it is glorious, it sometimes feels misdirected. The extraordinary evacuation of the stranded, defeated British army in May and June 1940 staved off what would otherwise have been an inevitably successful German invasion, runs the myth. Defeat became the platform for eventual victory.

What’s more, continues the myth, success came from below: through millions of acts of individual heroism, the British organised themselves into a collective act of derring-do. The “Dunkirk spirit” stands as emblematic of British bulldog virtues, proof of the underlying culture of successful, defiant resilience to which Harold Wilson appealed after devaluing the pound in 1967 and to which Brexiters appeal today. Any disaster, even one as epic as Brexit, can be turned around if millions have sufficient conviction, Dunkirk-style, to will it.

The film Dunkirk, released this week, is the compelling blockbuster account of those dark weeks seen through the eyes of the participants and will give the myth another lease of life. So it should. Heroism on this scale should and must be honoured. Dunkirk may have been a disaster, but part of its fascination is that, paradoxically, it was also a stunning achievement

Equally, it should not be allowed to submerge other truths. Britain’s naval and air strength was so formidable and our military production and technological capacity in crucial areas so superior to Germany’s that the chance of a successful Nazi invasion was close to non-existent. It is too rarely acknowledged – and does not make such good cinema – but the dismissed, undervalued British economy was also performing acts of heroism.

We manufactured more planes and ships than Germany throughout the war, closely matched its production of tanks and only fell short in the production of artillery pieces (although the British army was many divisions smaller than Germany’s). In 1940, that British prowess was on full display. In June, production had doubled within nine months, allowing the equipment left behind in France to be largely replaced by the autumn. During the Battle of Britain, production of Spitfires and Hurricanes consistently outstripped Germany’s production of military aircraft. One of the reasons the allies won the war was that we out-manufactured and out-produced Germany, Italy and Japan. The imbalances in power in some theatres of war are startling. Equally, Britain boasted great scientific and technological strength. Sophisticated radar identified German flight formations. The Spitfire and Hurricane – and, later, the Lancaster bomber – were more fit for purpose than their German counterparts and manufactured in greater volumes.

So, yes, we should and must salute the men in their flotilla of small boats who lifted tens of thousands of stricken British soldiers from the Dunkirk beaches. But much less fashionable is a salute to the superb performance of the British economy and the way its organisation was driven by government before and during the war. This is not part of our national mythology, for the obvious reason that it is very inconvenient for the prevailing orthodoxy. Public initiative, public endeavour, public direction of industry, planning and state co-ordination are never supposed to work, even though they did triumphantly, before the war, during it and after it.

Thus, one of the intellectual inspirations for the Thatcher government was the historian Correlli Barnett, in particular, his book The Audit of War. Barnett’s thesis, applauded by the Thatcherites, was that the war only cemented into place the worst of Britain’s anti-industrial, antediluvian, anti-scientific, restrictive practices and over-mighty trade unions. We then compounded this massive “error” by trying to build a new Jerusalem after the war, by creating the NHS, universal education, together with strong pension and unemployment benefits in the name of social justice. What was needed was less woolly welfarism and the Thatcher medicine to correct those first-order mistakes. Barnett’s thesis seemed wild at the time, but it seems even wilder now. By 1944, for example, Britain’s armies were wholly mechanised: only one tenth of Germany’s army was. As Richard Overy writes in his magisterial Why the Allies Won, its 7th and 15th armies in Normandy relied on 67,000 horses for their mobility. Even the vaunted Tiger and Panzer tanks were so heavy and technically complex they could not be produced at high volumes and broke down continually.

Britain’s productive performance, going into the war with Europe’s biggest aircraft industry, had its foundations in the industrial activism and state direction of the financial system that was launched in 1931. The Bank of England, apart from pegging the bank rate at 2%, which would last for nearly 20 years, forced Britain’s banks to reorganise and supply cheap long-term loans to the cotton, shipbuilding and steel industries. A cluster of new companies embodying the then frontier technologies – ICI, Hawker Siddeley, Thorn, Austin-Morris – emerged, backed by the Bankers Industrial Development Corporation and government grants, which were to underpin the triumphant feats of production in the war.

Throughout the 1940s, the same alchemy of state-led innovation and direction of credit drove Britain to global leadership in innovations including radar, artificial rubber, nylon, early computers, jet engines and were sustained by the Labour government as exports boomed in the postwar years. 1931 to 1950 are Britain’s unsung years of economic success, winning us a world war, transforming society and by 1950 giving us one of the most modern economies in the industrialised world.

It seems a distant prospect in 2017, after so much policy over so many years has been about reversing the state-led framework that produced that achievement. Our current account deficit now exceeds 5% of GDP, real wages and productivity are stagnant and there are no new companies or industries bursting through as in the 1930s. Last week, Labour peer Lord Adonis compared leaving the EU as a mistake analogous to appeasement. He is right. Brexiters Davis, Fox and Johnson are from the same anti-modern, delusional world view that produced the strategic foreign policy mistakes of the 1930s and the emasculation of the mixed-economy, state-led approach that underpinned the economic success of 1931-50.

Then, at least, we had underlying strengths, representing the opposite of their philosophy, upon which to fall back on. Brexit is our generation’s Dunkirk, but with no flotilla of small boats and no underlying economic strength to come to the rescue. It’s just defeat.

@williamnhutton