“I was just in D.C. and that’s the advice everybody gives: Don’t say you’re for Pelosi,” recalled former Representative Brad Ashford, a Nebraska Democrat trying to reclaim his seat. (He would not rule out backing Ms. Pelosi.)

Most ominous for Ms. Pelosi, it is not just centrist candidates running in red-tinged districts who are reluctant to embrace her, but also political insurgents on the left who see her as an embodiment of the Washington establishment.

“I would have to see who’s running,” said Marie Newman, a progressive Democratic House candidate in Illinois, when asked if she would support Ms. Pelosi for speaker. Ms. Newman is vying to unseat Representative Daniel Lipinski, a conservative Chicago Democrat, in a primary there on Tuesday.

And on Capitol Hill, Ms. Pelosi, 77, must contend with colleagues from her own generation who want their turn in charge, as well as younger Democrats who’d prefer to clear out the party’s entire septuagenarian leadership team: beyond Ms. Pelosi, the other two ranking House Democrats, Mr. Hoyer and James E. Clyburn, are 78 and 77.

Yet at a time when women are at the forefront of the opposition to Mr. Trump’s presidency — volunteering, donating and running for office in record numbers — the specter of Democrats taking back the House only to unceremoniously dump the most powerful woman in American politics strikes many in the party as outrageous.

And Ms. Pelosi herself is plainly in this camp.

“I’m a woman at the table,” she said in the interview Friday before getting on a plane for Houston, where she was going to raise money for House Democrats at the annual rodeo there.