Barack Obama has taken a swipe at his successor’s legal troubles, one day after the special counsel, Robert Mueller, ended a plea deal with Paul Manafort, Donald Trump’s former campaign chair.

“Not only did I not get indicted, nobody in my administration got indicted,” the former president said at an event in Houston on Tuesday, “which by the way was the only administration in modern history that that can be said about. In fact, nobody came close to being indicted, partly because the people who joined us were there for the right reasons. We were there to serve.”

Manafort breached a plea agreement he signed in September by “lying to the Federal Bureau of Investigation and the special counsel’s office on a variety of subject matters”, Mueller said in a court filing on Monday night. Mueller is investigating Russia’s interference in the 2016 presidential election, which US intelligence agencies concluded was aimed at boosting Trump’s bid for the White House, and any collusion between Russian operatives and Trump campaign team.

Mueller’s inquiry has so far led to indictments against 32 individuals and three Russian entities on charges ranging from computer hacking to obstruction of justice.

Obama also lamented the rise of insular nationalism in US politics, describing it as a threat to international stability and domestic prosperity.

He did not mention his successor by name but Trump and his “America first” strategy cast a long shadow as the former Democratic president discussed the decline of bipartisanship in American politics and the undermining of democracy and decorum by populism and extremism.

“People ask me what surprised me most about the presidency. It is the degree to which the United States underwrites the international order,” Obama said. “If there is a problem around the world, people do not call Moscow, they do not call Beijing. They call Washington. Even our adversaries expect us to solve problems and expect us to keep things running.

“When you start getting dysfunction in Washington which [makes it] difficult for decisions to get made and policymaking to run in an orderly process, what is one of our greatest assets – which is an extraordinary civil service, career staff, let’s say at the state department – when that begins to get undermined, that doesn’t just weaken our influence, it provides opportunities for disorder to start ramping up all around the world and ultimately makes us less safe and less prosperous.”

Obama also expressed regret over a hyper-partisan media landscape that he believes has made lawmakers and voters less willing to compromise and means Congress is stuck in a perpetual campaign mode.

In previous decades, Obama said, “there was a common set of facts, a baseline around which both parties had to adapt and respond to. By the time I take office [in 2009] what you increasingly have is a media environment in which if you are a Fox News viewer you have an entirely different reality than if you are a New York Times reader. It means the bases of each party have become more ideological.”

Leaders, Obama said, failed to anticipate how globalism and income inequality would breed the rise of populism and hostility towards immigrants even in countries with strong democratic traditions; trends exploited by Trump.

“You suddenly had a winner-take-all economy; where back in 1960 maybe the CEO makes 10 times more than the guy on the assembly line, now suddenly it’s 200 times or 300 times,” he said.

“We did not adapt quickly enough to the fact that people were being left behind and frustrations were going to flare up … In those environments you then start getting a different kind of politics, you start getting a politics that’s based on ‘that person’s not like me and it must be their fault’. And you start getting a politics based on a nationalism that’s not pride in country but hatred for somebody on the other side of the border.”

After largely staying above the fray in the months after he left the White House, Obama has been more vocal in recent months, campaigning for Democratic candidates in the run-up to this month’s midterms and criticising Trump by name for the first time in a speech in September.

Then, he accused the president of “capitalising on resentments that politicians have been fanning for years”, adding that “the politics of resentment and paranoia have unfortunately found a home in the Republican party”.

The 44th president was in Houston for a gala marking the 25th anniversary of Rice University’s Baker Institute for Public Policy. The bipartisan thinktank is named for James Baker, who served in the White House under Ronald Reagan and George HW Bush. Baker shared the stage with Obama on Tuesday in a roughly 50-minute discussion moderated by the historian Jon Meacham.

Earlier in the day, Obama met Bush at his home in Houston in what Bush’s spokesman, Jim McGrath, described as a “very pleasant and private visit … where they rekindled what was already a very warm friendship.”

Relations between Trump and Obama are rather more frosty. In comments that invited a contrast with the chaotic incoming administration following the 2016 election and implicitly referenced Trump’s self-centred personality,

Obama praised the outgoing George W Bush administration’s behaviour after the 2008 vote. “They had set up a transition process that was flawless and generous and thoughtful so that every member of 43’s staff had made themselves available to the person who was going to be taking their place,” he said.