Robert Mueller’s disastrous testimony has taken the wind out of the sails of the Democratic impeachment drive. That is a victory for President Trump. But it also was good news for House Speaker Nancy Pelosi.

For most Americans, the Mueller probe was about whether the president conspired with Russia to steal the 2016 election. Americans were told that the president was a traitor who had colluded with Vladimir Putin to subvert US democracy. So, when Mueller released his report in April concluding that “the investigation did not establish that the Trump Campaign coordinated with the Russian government in its election interference activities,” the country breathed a sigh of relief and was ready to move on.

A Harvard-Harris poll in May found that 65 percent of Americans said Congress shouldn’t begin impeachment proceedings against Trump, and 80 percent of Americans said they wanted their “congressional representatives working more on infrastructure, health care and immigration” instead of investigating the president. Pelosi was listening and tried to steer her caucus away from the suicidal push for impeachment.

But many Democrats refused to listen to her or the people. Instead of focusing on substantive issues, they kept probing Trump. Despite Mueller’s public declaration that he didn’t want to appear before Congress (because “the report is my testimony”), they insisted he appear — even threatening to subpoena him. The prospect of Mueller’s testimony loomed over the country for months.

That was a huge risk. The Washington Post reports that the Democratic Congressional Campaign Committee conducted focus groups in key battlegrounds that showed “the public’s impression of the new House majority is bound up in its battles with Trump, not in its policy agenda,” and the preoccupation with investigations was “overshadowing the party’s agenda, threatening its grip on the House in 2020.”

Rep. Charlie Crist of Florida, a DCCC vice chairman, warned that “it seems like there is a preoccupation with what’s happening as it relates to the White House, and so everything else sort of gets drowned out.”

Democrats took the House in 2018 by focusing on kitchen-table issues like health care and prescription-drug prices to flip districts Trump won in 2016. But the impeachment obsession is threatening vulnerable freshmen in those Trump districts.

Rep. Ben McAdams of Utah, who won in a Trump district, complained that “I’m spending zero hours per week, zero minutes per week on investigations and impeachment, and I’m spending a lot of time on the issues that my district sent me here to work on. . . . But it doesn’t break through.”

Many of McAdams’ colleagues were unmoved by such entreaties. While pushing for Mueller to testify might overshadow their policy work, they calculated that it would also provide sound bites that would be politically devastating for the president. Their bet didn’t pay off. Mueller sounded fragile and confused, and he gave Democrats no new ammunition to use against Trump.

To the contrary, when he was asked by Rep. Doug Collins of Georgia, “At any time in the investigation, was your investigation curtailed or stopped or hindered?” Mueller replied “no.” It’s hard to make a case for obstruction when the special counsel says he wasn’t obstructed.

Dems’ impeachment drive was never going to work. Even if they did pass articles of impeachment, the Senate isn’t going to convict him. The only way they’re going to get Trump out of office is by beating him in the 2020 election.

But instead of focusing on things they need to do to defeat Trump at the ballot box — such as a policy agenda to win back working-class voters who voted for Obama but defected to Trump in 2016 — they’re focused on impeachment. Not only is that not winning back those Obama-Trump voters, it is pushing them away, because it is perceived as an effort to invalidate their votes.

So, the Mueller debacle was a gift to Pelosi. She gave her Democrats a shot at making their case for impeachment, and it blew up in their faces. Yet despite the obvious failure of the Mueller hearings, some pro-impeachment Democrats are undeterred. Politico reports that in a closed-door meeting after Mueller left Capitol Hill, House Judiciary Committee chairman Jerry Nadler of New York pushed to launch impeachment proceedings.

Talk about a tin ear.

Pelosi understands that if Democrats run in 2020 on ­impeachment and socialism, they could lose not just the White House, but their House majority as well. The question is: Does her caucus now finally get it — or will they continue their suicidal impeachment drive?

© 2019, The Washington Post Writers Group