It’s no secret that President Trump will lose deep-blue California in 2020, but Republicans are betting they can grab back some of the congressional seats they lost last year by slamming Democratic freshmen who are calling for the president’s impeachment.

For months, GOP leaders have been on the attack against the seven Democrats who flipped Republican-held House seats in 2018, charging that their growing support for impeachment is an insult to the swing voters who elected them.

“Josh Harder dropped his moderate facade today and joined his fellow socialist Democrats on their politically motivated quest to impeach President Trump,” charged an email from the National Republican Congressional Committee when the Turlock (Stanislaus County) Democrat said in September he would support impeachment.

When Fresno Democratic Rep. TJ Cox scheduled a town hall on the health problem of valley fever, Republicans called on district residents to “head out to @RepTjCox’s town hall today to ask about his deranged impeachment push.”

Trump supporters held a rally outside Democratic Rep. Katie Porter’s Irvine headquarters two weeks ago, calling on Porter and the other targeted Congress members to oppose impeachment. “These Democrats ran on the promise they would get things done in D.C., but now they’ve joined Nancy Pelosi’s baseless impeachment witch hunt,” said former GOP Rep. Doug Ose, head of Trump’s California campaign.

And when the House approved rules for the impeachment inquiry Thursday, Republicans were quick to focus on the California freshmen. They “chose to side with Nancy Pelosi, Adam Schiff and the socialist squad over their constituents,” Samantha Zager, a spokeswoman for Trump’s re-election campaign, said in an email.

Republicans’ impeachment focus seems like a bold strategy in a state where a recent poll by the Public Policy Institute of California found that two-thirds of adults disapprove of the job Trump is doing. But GOP leaders are convinced the plan is a winner.

“Especially in swing districts, (impeachment) absolutely is a key issue,” said Torunn Sinclair, a spokeswoman for the National Republican Congressional Committee. “These Democrats were all elected on getting things done, and now all people see from them is impeachment.”

Republicans tout an October poll by Public Opinion Strategies of 95 battleground congressional districts, which found that 55% of voters surveyed said it would be better to wait for the 2020 election than move ahead with impeachment. The poll also indicated that generic anti-impeachment challengers would hold an advantage over pro-impeachment incumbents in those swing districts.

“Congressional Democrats who represent Trump districts appear to be in a precarious position here,” pollster Neil Newhouse said in a memo to the GOP campaign committee and House GOP leader Kevin McCarthy of Bakersfield, who paid for the poll. “Voters clearly side against impeachment.”

That follows GOP-sponsored polls in July that found voters in three California districts — those held by Porter, Cox and another first-term Democrat, Rep. Gil Cisneros of Yorba Linda (Orange County) — were strongly opposed to impeachment.

The numbers, however, depend on what poll you’re looking at.

The RealClearPolitics polling average finds national support for Trump’s impeachment and removal with a slim edge. And while swing districts may lean more against impeachment, the seven California districts Democrats flipped last year all backed Democrat Hillary Clinton over Trump in 2016.

California Democrats, including House Speaker Nancy Pelosi of San Francisco, recognized the potential dangers of a pro-impeachment stance. It wasn’t until late September, just days before Pelosi announced the opening of an impeachment inquiry after months of resisting the idea, that Cisneros became the last of the seven first-term House members to sign on.

Despite concerns about the politics of impeachment, there’s no way any Democratic incumbent can stay neutral, said Thad Kousser, a political scientist at UC San Diego.

“There’s no hiding from the impeachment votes,” he said. “You might as well own your position and shout it to your base.”

For Democrats in an anti-Trump state, that means going on the attack.

An October email from the Democratic Congressional Campaign Committee slammed former GOP Rep. David Valadao, who is seeking a Central Valley rematch against Cox, for taking contributions from associates of Trump attorney Rudy Giuliani who are now charged with funneling foreign money into 2018 campaigns.

“Valadao has vowed complete fealty to Trump,” said committee spokesman Andy Orellana, who added that Valadao “remains mum on impeachment.”

Democrats also took aim at Brian Maryott, a Republican challenging first-term Democratic Rep. Mike Levin of San Juan Capistrano (Orange County), for staying silent on Trump’s telephone conversation with Ukraine’s president about investigating potential 2020 Democratic rival Joe Biden.

“Where is the line for conduct by an American president he will not condone?” the campaign committee asked.

In a fundraising email, Cisneros took a swipe at Republican Young Kim, who is running against him after losing the congressional race last year. By refusing to say whether Trump crossed a line in his conversation with the Ukrainian president, “Kim is refusing to stand up to Trump because she’s worried about the political blowback,” Cisneros said.

For Democrats, it’s better to get this fight started now, a year before the election, than it would be next fall, Kousser said. This way, it will be old news by 2020.

As for Republican challengers running in anti-Trump districts, even if impeachment isn’t a vote winner, “they can raise money off it,” he said.

John Wildermuth is a San Francisco Chronicle staff writer. Email: jwildermuth@sfchronicle.com Twitter: @jfwildermuth