– It has been impossible to watch the general election without being haunted by a single question-come-exclamation: surely Britain can do better than this?

The best performer in the campaign, Jeremy Corbyn, the Labour leader, is a 68-year-old crypto-communist who has never run anything except his own mouth. Theresa May, the Tory leader, tried to make the election all about herself and then demonstrated that there wasn't much of a self to make it about. As for Tim Farron, the Liberal Democrats' leader, he looked more like a schoolboy playing the part of a politician in an end-of-term play than a potential prime minister.

The result was a surprise: the Conservative party lost its overall majority and May remains in power only after being propped up by Ulster's Democratic Union party.

Complaining about the quality of your leaders is an ancient tradition. Yet sometimes decline really is decline.

Both May and Corbyn wanted to extend the already considerable powers of the government, Corbyn massively so. And both promise to lead Britain out of the European Union, a fiendishly complicated operation.

Unfortunately, both demonstrated that they are the flawed captains of flawed teams. May broke the first rule of politics: don't kick your most faithful voters in the teeth for no reason. Corbyn has stood out in part because his team is so mediocre. Diane Abbott, his shadow home secretary, stepped down the day before the election citing ill health, after a succession of disastrous interviews.

In 1922 Winston Churchill dubbed Bonar Law's coalition government the "second eleven" because so many top players, including David Lloyd George, refused to serve in it.

Today both major parties are fielding their second elevens — Labour because of the rise of the far-left and the Tories because of Brexit. On the left, three-quarters of Labour MPs have concluded that Corbyn is not fit to run their party. On the right, Brexit has hollowed out the party. Several prominent Remainers (including David Cameron and George Osborne) have retired, while several leading Leavers (such as Boris Johnson and Michael Gove) are seriously weakened. The Conservative Party chose May because she hadn't expressed any strong opinions about the most important question of her time.

There are also deeper reasons. For most of the 20th century, British politics enjoyed an embarrassment of riches. Britain's competing elites directed their most gifted offspring toward Parliament. The landed aristocracy sent Churchill and the Cecil clan. The business crowd offered Harold Macmillan and the Chamberlain dynasty. The trade unions put forward Ernest Bevin, Nye Bevan and James Callaghan. And the meritocratic elite sent intellectuals galore — so many, in fact, that the 1964-66 Labour cabinet contained seven people with first-class degrees from Oxbridge (Oxford and Cambridge.)

There was plenty of dross among the gold, of course: Tory knights of the shires who didn't care about much except badger culling and Labour trade-unionists who were only there for the beer. But the gold shone brightly. And it was well distributed between the major parties, with the Tories mobilizing the forces of property and Labour the workers and intellectuals. Today it is as if Britain's various elites have all decided, at exactly the same time, to stop sending their best people to Parliament.

It is harder to sell landed aristocrats to the people than it used to be. The trade unions are shadows of their former selves. But there is one big reason. Over the past 30 years politics has become a profession. Yesterday's tribunes of the people, or at least of the people's leading interest groups, have been replaced by professionals who make their livelihood out of politics. The trouble is, it turns out that politics is not a very attractive profession.

Most people crave two types of rewards: material (money and security) and psychological (esteem and fulfillment). Politicians don't get much of any of this. They have seen their salaries fall relative to the sort of jobs that their university contemporaries go into, such as banking, consultancy and the law.

They endure horrendous workloads: constituencies to nurse, speeches to make and, if they are ministers, huge departments to run. They live with the possibility of having the rug pulled from under their feet by electoral misfortune or personal scandal. And the public treats them with a mixture of suspicion and contempt. The proportion of Britons telling pollsters that they almost never trust the government has risen from one in 10 in 1986 to one in three today. The biggest reward for putting up with all this is nebulous: the sense that you are part of the whirl while history is being made.

There are a few things that can be done to slow the decline. One is to give more respect to age and experience in selecting MPs. Parliament is overstuffed with young former aides. Selection committees need to pay more attention to candidates who have already succeeded in other professions.

A second is to broaden the talent pool. Margaret Thatcher used the House of Lords to bring in business people such as David Young. Gordon Brown did the same to try to create an administration of "all the talents." The devolution of power to the cities may also provide another road to the top. If Britain embraces these and other ideas the electorate might face a more inspiring choice at the next election.

But it is too late to do anything about the current mess. Britain is going into bat against Brussels with one of the weakest teams it has fielded in decades.