How does Labour do even better next time? There is no more important debate, so almost any contribution to it has to be welcome. Getting another five per cent of the vote in the next election may prove to be more challenging than the ten per cent increase secured last month.

There is one approach being promoted by a number of MPs and others. The argument runs that Labour is losing ground among working-class voters, whilst gaining elsewhere, and that this problem needs to be addressed by changing our approach on security.

Here, I will question the underpinning analysis of this approach, and argue that it appears teleological – the desired policy end appears to be determining the line of argument.

First, that argument. It was presented in its mildest form by deputy leader Tom Watson who, in an interview with the Observer, said that Labour needed to “give greater reassurance to our traditional working-class voters, some of whom left us on issues like policing and security.” Gerard Coyne, a candidate in the recent Unite general secretary election, put it more strongly in the Sunday Express: “For all Labour’s unforeseen success, its working-class base is eroding alarmingly…Labour doesn’t understand the deep vein of patriotism running through working-class families.”

The Guardian reported the views of Gloria de Piero (Ashfield) and Graham Jones (Hyndburn). De Piero said that former coalfield seats like hers “are the beating heart of our movement” and that to improve on the 2017 result “we need to listen to the voters who left us in seats like my own and act on their concerns.”

Jones was far more forceful and explicit: “How thick does this party have to be? We have not learnt the lessons from the rise of the BNP. Our core voters cannot be taken for granted…We have to talk about their concerns – counter-terrorism, nationalism, defence and community, the nuclear deterrent and patriotism.”

Finally, and most substantially, Sedgefield MP Phil Wilson, wrote for the Fabians, acknowledging Labour’s appeal to “the young, especially students and diverse communities” but claiming that we lost support among working-class voters. He bases this on the swing to the Tories in a number of “traditional Labour seats”, citing in particular those in his own north-east region and in the East Midlands.

Sounding for a moment like a 1990s left-wing critic of “New Labour”, Wilson argues that “Labour needs to win middle class votes to form a government, but only when in tandem with our core working-class support…The route to a sustainable Labour victory will not be found by travelling only the middle class streets of Kensington and the campuses of our university towns, the route must take us through the working-class communities of the North too. To win over the middle classes, but lose the support of the working classes would be the Labour Party’s gravest folly.” Wilson does not propose a particular policy orientation to achieve this, beyond an implied objection to Labour’s pledge to abolish tuition fees. He was, however, one of the Labour candidates who went furthest to dissociate himself from Jeremy Corbyn in the course of the recent campaign.

To examine the strength of the underlying premise of this position, I looked at the Labour vote in nine constituencies – the four which the MPs concerned represent (Ashfield, Hyndburn, Sedgefield and West Bromwich East) as well as the five seats which Labour lost on June 8 (Mansfield, Middlesbrough South, North-East Derbyshire, Stoke-on-Trent South and Walsall North). These represent a fair spread across heartland Labour regions, although Yorkshire and the Humber is missing. They could all probably be fairly described as “traditional Labour”, although Hyndburn has been won by the Tories on several occasions, and Ashfield was famously lost to the Conservatives in a 1977 by-election. Many are ex-mining seats, although here too there is not a common history – Ashfield and Mansfield sit in the Nottinghamshire coalfield which sustained right-wing breakaways from the National Union of Mineworkers in the 1930s and again in the 1980s. Some of the seats have a considerable ethnic minority population, but most do not. None have a high student vote.

They all have one thing in common, however: Labour’s candidates secured the highest votes, and the highest share of the vote, since 2005, often since 2001 and in some cases since 1997. That is – more working-class voters turned out for Corbyn’s Labour than for Miliband’s, Brown’s or latter-day Blair’s. Let me acknowledge straight away that a better vote and share of the poll is cold comfort if you nevertheless come second, and that is a point I will return to. However, it cannot be cited as evidence of a mass 2017 defection from Labour by core voters. A moment’s analysis suggests that if Labour has lost heartland votes (and it has by comparison with 1997 or the 1960s come to that, but not by any subsequent measure), then the problem arose much earlier, during the Blair-Brown years, and Corbyn’s Labour has actually gone a long way to reversing the losses. The “alarming erosion” perceived by some is not supported by the evidence.

Let us look at the facts, and flag up that in some of the seats boundary changes during the period surveyed may have made a small difference. It is important to focus on share of the vote as well as absolute numbers to allow for the impact of the steadily-rising election turnout since the historic low of 2001.

In Watson’s West Bromwich East seat, he secured the highest vote (22,664) and the highest share of the vote (58.0 per cent) he has ever won, and he has been MP since 2001. Indeed, Labour’s share of the vote this year, but not the absolute number, was slightly better than in 1997!

In Hyndburn, Labour’s vote (24,120) was the best since 1997, and the share of the vote (53.4 per cent) the best since 2001, with a whopping 11.2 per cent rise on 2015.

In Ashfield, Gloria de Piero’s achievement was slightly more modest. Her 21,285 votes was Labour’s highest figure since 2001, but her 42.6 per cent share of the poll, while a personal best, was merely Labour’s biggest since 2005.

Sedgefield tells the same story. Phil Wilson was re-elected with more votes than he has ever secured (he succeeded Tony Blair in the seat in a 2007 by-election) – 22,202. His 53.4 per cent share of the poll is also a personal best. Now in the Fabian article he wrote, Wilson himself tells us that his constituency is “97.4 per cent white British, 27 per cent have no qualifications, well above the national average, while 5.7 per cent of the resident population are full-time students, well below the national average of 9 per cent.”

So it is fair to ask Mr Wilson – if as he asserts, Labour’s extended appeal was exclusively or overwhelmingly to “…students and diverse communities” – to what does he attribute his own barnstorming performance in a seat largely bereft of both categories?

An analysis of the seats lost by Labour on June 8 reinforces the point. They all, of course, showed a swing to the Tories, as did the north-east seats Wilson cites in his article, and this must be addressed, but they did not show a collapse in Labour’s support. The reverse, in fact.

Mansfield – best Labour vote since 1997, highest share since 2005 – Labour’s share rose more than five per cent since 2015.

Middlesbrough South and East Cleveland – highest vote since 2001, and best share (up 5.5 per cent to 47.5 per cent) since 2005, with Labour’s Tracy Harvey winning back Labour votes lost by her predecessor Tom Blenkinsop.

North-East Derbyshire – Natascha Engel’s 21,293 votes and 43.5 per cent of the poll represented her best result since first elected in 2005.

Stoke-on-Trent South – Rob Flello was unfortunate enough to lose with the highest Labour vote and the highest share of the vote he has ever secured. He first won the seat in 2005, and indeed his share this time around was up 8.3 per cent on two years ago.

Finally, Walsall North, where extremely long-serving MP David Winnick lost – but with the most votes since 2001 and a higher share than 2005.

None of these statistics takes away the sting of defeat. But they do clearly contradict a narrative that suggests that Labour is losing ground in heartland seats. The swing to the Tories in such constituencies, and the loss of a handful of them, was due to other factors. The most important was undoubtedly UKIP.

In Stoke South, UKIP did not stand this year, having polled more than 21 per cent of the vote in 2015. In Walsall North, their vote share fell from 22 per cent to six per cent. In NE Derbyshire, from nearly 16 per cent to just 3.1 per cent.

In Middlesbrough South, UKIP stood aside, leaving their 2015 vote share of 15.2 per cent homeless. And in Mansfield, a 25 per cent share in 2015 fell to just 5.3 per cent.

Most of UKIP’s missing thousands clearly went to the Tories – which in some cases would be a returning home to a party now standing for a hard Brexit and pandering to anti-immigrant rhetoric under Theresa May.

Others will, of course, have been Labour voters in the past. However, they were clearly not lost to the party in 2017 but considerably earlier. The swing to the Tories was a result of the coalescence of what in 2015 had been a split right-wing vote, which in some constituencies outweighed the impressive increase in Labour’s vote share.

None of this dismisses the concerns raised by the various MPs – however, it does suggest that they are misidentifying the timing and causes of a drift in the “traditional” working-class vote from Labour, and are therefore at risk of misdiagnosing the response.

Of course, there is a weight of anecdotal and canvassing evidence that there was a degree of hostility among older, white, working-class self-described Labour voters towards the leadership. How can this be reconciled with the actual irrefutable evidence of votes cast?

First, as far as canvassing returns go – it seems clear that younger people, including young working-class voters, were crucial to Labour’s huge advance, and that canvassing appears to miss such voters out to a significant extent.

Second, some of those expressing hostile views about Labour or its leadership at the start of the campaign may nevertheless have voted Labour come June 8. They may have been won over by the manifesto, come round to a more positive view of Jeremy Corbyn over the campaign, or simply succumbed to the tug of traditional loyalties.

Third, some of those noisily advertising a defection from voting Labour when canvassed or polled may not have actually voted Labour for some years. There are those who would still regard themselves as culturally “Labour” but who stopped voting altogether from 2001 onwards, or who transferred to UKIP subsequently. This would correspond to falling turnout in core Labour areas over the last generation.

I do not pretend these factors can be easily quantified, nor that they tell the whole story. But they certainly come nearer to the truth than the idea that a whole voting bloc is abandoning the party, an idea which is contradicted by the hard facts of election results.

And to the extent that some crumbling of a traditional Labour vote has occurred, it would seem plain that it happened some time ago.

If Labour has lost the support of once-loyal voters, this happened overwhelmingly in the new Labour years, when nearly five million voters abandoned the party, either for abstention or for UKIP, the Tories, the Liberal Democrats or the SNP. 2015 saw a very modest return to the fold (except in Scotland of course); 2017 a much larger one, allied to the unprecedented mobilisation of first-time and never-before voters.

That being the case, it is hardly likely that such crumbling as has occurred was over security, at least in the way the question is being presently framed. To put it starkly – if working-class people stopped voting Labour in 2005 or 2010 for defence-related reasons, it would have been because new Labour fought too many wars, not too few. Of course, it would be likely that the loss of working-class support in those yeas was as much or more to do with actual and perceived government failures on economic and social issues, including the disappearance of so many manufacturing jobs and widening inequality.

This then leaves the question – if there is a problem, is it best addressed by shifting policy on security-related issues, as some are advocating? For all the wrong reasons, the 2017 election campaign provided an acid test of this too.

The atrocities in Manchester and at London Bridge brought security concerns to the heart of the election in the most direct and ferocious fashion. And Labour’s mature and measured response, exemplified by Corbyn’s speech when campaigning resumed after the Manchester attack – taking voters seriously and framing the problem of terrorism against a broad background, including British foreign policy decisions – proved popular and well-judged.

The idea that Labour would have done better by simply yelling ‘shoot to kill’ (unavoidable as that police response was at London Bridge) or ‘I’ll press the button’ is fallacious. It would risk alienating some of the new votes secured this year in pursuit of those who, on the evidence, became disaffected on other issues.

Of course, discussion around Labour’s policies on wars of intervention, terrorism, nuclear weapons and the alliance with the USA will surely continue. But these should be debated on their merits, and not on an electoral calculation that seems specious.

Equally, strengthening Labour’s position (under a revivified two-party system) in working-class seats is essential. But this should be based on recognition of what has been achieved in these areas in 2017, and of the real roots of the remaining problem.

As Phil Wilson wrote, Labour needs votes drawn from both middle-class and working-class people if it is to govern. Since we have a leader who was cheered to the echo at both the Glastonbury Festival and the Durham Miners’ Gala in the course of the same fortnight, we seem well on the way.

Andrew Murray is chief of staff at Unite, the UK and Ireland’s biggest union. He worked on the 2017 Labour general election campaign.