British culture reserves affection for failure if it is heroic, or even dogged, and in that spirit it is possible that history will not be as unkind to Theresa May as politics has been. The prime minister’s tenure in Downing Street ends next week with few policy accomplishments to her name and the single most important task – Brexit – messily incomplete.

There is no evidence that the nation thinks warmly of her, although there is respect for her tenacity, stamina and probity. It is easy to find critics of her judgment, but no one thinks she has been venal. Critics who think her principles were the wrong ones acknowledge at least the aspiration to be principled. The contrast with her successor could hardly be starker.

The character of Boris Johnson lurked in the wings when Mrs May took to the stage for a valedictory speech on Wednesday . When the prime minister warned of a dangerous populist ethos that eschews compromise and advances by “telling people what you think they want to hear”, it was hard not to suppose that the likely winner of the current Conservative leadership contest was present in her mind, even if she refused subsequent invitation to make the connection explicit.

Mrs May also refused to name Donald Trump in her account of forces corroding the values and norms of liberal democracy, although he matches her disapproving description of politicians who take a zero-sum view of the world, according to which “power unconstrained by rules is the only currency”.

The prime minister did not want to stir domestic or international controversy with a mostly abstract description of social, political and technological drivers of what she called “absolutism” – the capture of public discourse by uncompromising aggression. Perhaps diplomatic discretion is appropriate when she is still, just about, in office, but her message was blunted by a characteristic lack of candour. Her analysis was true but unoriginal. The forces she describes have been well documented over recent years and the period of her maximum capacity to do something about them expires next week.

When asked about populist currents in her own language around Brexit – the notorious 2016 characterisation of its opponents as “citizens of nowhere”, for example – Mrs May evaded the question. She also missed yet another opportunity to speak bluntly about the hazards of quitting the EU without a deal, although she knows well enough what they are. She retreated into a familiar routine of blaming parliament for the current impasse, as if she were a paragon of flexibility and compromise while implacability was found everywhere else. No honest narration of the past three years would substantiate that self-serving revision of events. It is true that Mrs May suffered at the hands of fanatical Eurosceptics in her own party, but by pandering to their unrealistic fantasies she became the author of her own misfortune.

It is sad but not surprising that even at this late stage the outgoing prime minister lacks the introspective capacity to draw and share valuable insights from her experience in office. The section of her speech that attempted to list achievements relevant to the problems she had described contained unintentional pathos. A fledgling “modern industrial strategy” offers no serious counterweight to structural economic problems that have nurtured the alienation and grievance feeding political extremism and polarisation. It might be painful for Mrs May to acknowledge that she has barely scratched the surface of epoch-defining problems, that she saw burning injustice without healing it, but she cannot expect a more generous legacy. It is better that she at least recognises the challenge when some in her party deny it. It is to her credit that, by way of valediction, she raises matters of grave concern for the near future. Whatever else might be said of Mrs May, she is a serious politician cognisant of responsibilities attached to her office. The same cannot be said of the man who is poised to succeed her. In that respect, while her legacy is flimsy, the solidity of her character might yet be missed.