The election was a crushing defeat – but not for either of the major parties. The faction that now retreats in utter disarray wasn’t technically standing, though in the past it has arguably wielded more power than the formal contestants. I’m talking about the media.

The rightwing press threw everything it had at Jeremy Corbyn, and failed to knock him over. In doing so, it broke its own power. Its wild claims succeeded in destroying not Corbyn’s credibility but its own. However the problem is by no means confined to the corporate media. The failure also belongs to media outside the grasp of billionaires. It is one from which some platforms may struggle to recover.

There is no point in trying to hide or minimise this: the election has been a disaster for mainstream outlets. They missed the moment because they were constitutionally destined to do so. The issue that caused this disaster is the one that eventually fells all forms of power: the media has created a hall of mirrors, in which like-minded people reflect and reproduce each other’s opinions.

The broadcasters echo what the papers say, the papers pick up what the broadcasters say. A narrow group of favoured pundits appear on the news programmes again and again. Press prizes are awarded to those who reflect the consensus, and denied to those who think differently. People won’t step outside the circle for fear of ridicule and exclusion.

A study at Cardiff University shows how the broadcasters allow themselves to be led by the newspapers, despite the massive bias of the printed press. For example, during the 2015 election campaign opinion polls revealed that the NHS came top of the list of voters’ concerns while the economy came third. But the economy, on which the Conservatives were perceived to be strongest, received four times as much coverage on TV news as the NHS, which was seen as Labour’s strongest suit. This appeared to reflect the weight given to these issues in the papers, most of which sought a Conservative victory.

An analysis by the Media Reform Coalition and Birkbeck College found that, despite the rules on impartiality and balance, when Corbyn’s leadership was being challenged last summer, the BBC’s evening news bulletins gave almost twice as much airtime to his critics as they gave to his supporters. They often ascribed militancy and aggression to him and his supporters, but never to his challengers. One report on the BBC News at Six finished with the words “This is a fight only one side can win. The others are being carted off to irrelevance. The place for political losers.” The accompanying shot showed a dustbin lorry setting off, painted with the word Corbyn.

This problem also affects the Guardian. According to a study by the London School of Economics of the representation of Corbyn by newspapers in his first two months as Labour leader (in the autumn of 2015), around a fifth of news articles in this paper lacked balance. Overall, roughly 18% of its coverage was judged supportive of Corbyn, 53% was neutral, and 29% was negative. This is a better balance than in the other liberal papers. Indeed, the Guardian had more diverse and more pro-Corbyn voices than any other mainstream outlet. Only the Guardian and the Mirror enthusiastically supported both Labour and Corbyn in election editorials.

But the scales still didn’t balance. Even I, who was supportive at the beginning of Corbyn’s candidacy and during his election campaign, fell into despair about his leadership during the winter after a series of fiascos in parliament, and tweeted: “I have now lost all faith.”

The net result is that the most dynamic political force this nation has seen for decades feels alienated by the media, and not just by the Tory press. Those who have thrown so much energy into the great political revival, many of whom are young, have been almost unrepresented; their concerns and passions have been unheeded, misunderstood or reviled. When they have raised complaints, journalists have often reacted angrily, writing off movements that have gathered in hope as a rabble of Trots and wreckers.

This response has been catastrophic in the age of social media. What many people in this movement now perceive is a solid bloc of affluent, middle-aged journalists instructing young people mired in rent and debt to abandon their hopes of a better world. Why has it come to this, even in the media that’s not owned by billionaires?

It is partly because this industry, in which people without a degree could once work their way up from the floor, now tends to select its entrants from a small, highly educated pool. The use of internships narrows the selection further. Wherever they come from, journalists, on average, end up better paid than most people. Whatever their professed beliefs, they tend to be drawn towards their class interests.

But the biggest problem, I believe, is that we spend too much time in each other’s company, a tendency that is fatal in an industry that is meant to reflect the world. There has been a major effort by some media, including the Guardian, to get away from Westminster and to hear the voices of the rest of the country. This is good, but it is not enough. What counts is not only the new people and new ideas you encounter, but also the old ones you leave behind. The first ambition of a journalist should be to know as few journalists as possible – to escape the hall of mirrors.

The media as a whole has succumbed to a new treason of the intellectuals, first absorbing dominant ideologies, then persuading each other that these are the only views worth holding. If we are to reclaim some relevance in these times of flux and crisis, we urgently need to broaden the pool of contributors and perspectives.

We should actively recruit people from poorer backgrounds, and diversify our expertise. Newsrooms tend to be largely peopled by humanities graduates. Over the years, I have found myself explaining to other journalists how to calculate percentages, that two orders of magnitude greater does not mean double, and that animals and mammals are not synonyms. There is a lack of contact not only with most of the population, but also with the material world and its physical parameters.

We need to interrogate every item of the news agenda and the way in which it is framed. We should ask ourselves where our own interests lie – and how we might avoid reproducing them. And, to the greatest extent possible, we should avoid each other like the plague.