Where a proposed ban on all Muslims entering the US, a call for 11 million migrants to be deported and an alpha-male brag about the size of his penis all failed, a demand that women face “some sort of punishment” for having an abortion might just succeed.

It’s as if Donald Trump has been playing an extended game of chicken these last few months, piling insult upon offence upon sheer grossness, daring the Republican electorate to repudiate him. So far those Americans have refused to blink, repeatedly favouring the real estate mogul with their votes, no matter what garbage comes out of his mouth. But his suggestion this week that women be sent to the ducking stool or be stoned in the public square – he was hazy on the details – might finally prove too much.

We’ll know soon enough, as the carnival-cum-horror-show that is the 2016 primary season enters its decisive stretch. Meanwhile, somewhere offstage, cloistered in the relative obscurity of the White House, is the man who is president of the United States. So intense has been the global gaze on Trump and his rivals, Barack Obama has been all but forgotten.

Yet, quietly, the process of assessing his record and divining the meaning of the Obama presidency has begun. The April edition of the Atlantic magazine carries a 20,000-word essay on The Obama Doctrine, based on a series of in-depth, unashamedly philosophical conversations between the outgoing president and journalist Jeffrey Goldberg. And on Tuesday BBC2 will broadcast the final part of Inside Obama’s White House, a riveting series made by the acclaimed filmmaker Norma Percy and anchored in interviews with every key player of the last eight years, from Obama downwards.

But a curious dynamic is at work, one that is accelerating the usual legacy-shaping process. Every presidency is always judged, in part, by what follows it: nothing burnished Bill Clinton’s historical standing more effectively than the comparison with his successor, George W Bush. But in 2016, that process is happening a stage early, pre-emptively even. Anyone looking back at Obama can’t help but look forward to an imagined – and mercifully unlikely – Trump presidency and draw the obvious contrast.

Even without that flattering light, the Obama record is a solid one. In his first term, he prevented the US economy tipping from a great recession into a second great depression, through a stimulus bill whose success put the lie to the notion that there is no alternative to austerity. He also secured the healthcare reform that had eluded seven previous Democratic presidents through a century of trying.

For the wider world, Obama’s place in history will naturally rest on his conduct of international affairs. The ledger there will show some serious gains: breakthrough deals with previous sworn enemies, Iran and Cuba; last year’s Paris accords on climate change; the removal of Osama bin Laden. Historians will be less kind when they ask why the slaughter in Syria was allowed to go unchecked, while Islamic State rose and Vladimir Putin flexed his muscles in Crimea and Damascus.

Yet, as the Atlantic interview makes clear, Obama’s more enduring contribution may be measured less in the trophies and traumas that will fill future historians’ credit and debit columns, and more in the worldview that took shape during his time in office.

Obama offers a kind of liberal realism, a midpoint between cold-eyed pragmatism and gung-ho liberal interventionism

For Obama forged a new vision of American power, one that saw the US still as the indispensable nation but one whose reach was no longer, to quote Obama, “limitless”. Part of that was a familiar process of retrenchment, the US drawing in its talons after a period of military exertion: Goldberg cites Eisenhower and Nixon as precedents. But there was more to it than a simple reaction to the calamities of the Bush era in Iraq and Afghanistan.

Obama has a doctrinal preference for restraint too. He believes the US can hit – and hit hard – when its own national security is directly at stake: witness his unsqueamish readiness to use drones to kill al-Qaida or Isis leaders. But he believes the US should hold back when its own interests are not directly threatened. Even a desperate humanitarian need cannot, on its own, justify US action.

What Obama offers is a kind of liberal realism, a midpoint between cold-eyed pragmatism, willing to shrug in the face of evil, and gung-ho liberal interventionism. “We’ve got to be hardheaded at the same time as we’re bighearted,” he told the Atlantic, “and pick and choose our spots… There are going to be times where we can do something about innocent people being killed, but there are going to be times where we can’t.”

A defining trait of the Obama period has been his faith in diplomacy, exemplified by his dogged pursuit of dialogue with both Cuba and Iran. Underpinning that is a view that is striking coming from a US president. He has kicked against what he sees as the fatal defect in the Washington foreign policy establishment, the assumption that every problem has a military solution.

It strikes him as “weird” the way that, once the US uses its “moral authority” to denounce a brutal regime, then people presume “you are obliged to invade the country and install a government you prefer”. Obama doesn’t put it this way, but he’s surely making the age-old observation that to a man who has only a hammer, every problem looks like a nail. He wants the US to see it has other more effective tools, diplomacy chief among them.

Now there are arguments to be had with all of this, especially over the question of where one draws the line between a desperate humanitarian crisis and one that threatens US interests. Famously, Obama decided that no matter how terrible the suffering of the Syrian people, it did not merit US military action.

He told both the BBC and the Atlantic he is “proud” that he defied expectations and did not strike Syria in August 2013, proud of breaking from the usual Washington playbook that defaults to force. But the question will always linger: if the president had struck Assad then, or even in 2011 when the regime was crushing unarmed protesters, might he have deterred the Syrian dictator from slaughtering so many of his own people?

Some in Obama’s inner circle thought so. We will never know who was right. But what no one can dispute is that this president weighed it all with the utmost care, with an awareness of America’s history in the Middle East, Latin America and Asia and how, therefore, the country is often viewed with suspicion around the world, and of its tendency to hubris. He listened to his advisers, tried to shut out the cacophony of the next day’s headlines, and proceeded with what can only be called moral seriousness.

Hillary Clinton would be a serious president too, even if one quicker to resort to force than Obama. And then you think of Trump, who when asked to name his foreign policy advisers said, “I’m speaking with myself, number one, because I have a very good brain and I’ve said a lot of things.”

Obama has nine more months in office. As we look around the ever more bizarre landscape of 2016 there is one thing we can predict with confidence: we will miss him when he’s gone.