I don't have strong feelings one way or the other about whether Democrats should fire Nancy Pelosi. But I do have strong feelings about people who howl incessantly that Democrats should fire Nancy Pelosi. There would be no point to forcing her out—and Democrats certainly wouldn't be solving all their apparent electoral problems* by doing so.
There's no question that Republicans have had success using Pelosi as a bogeyman in campaign ads—"vote for the Democrat," they threaten, "and Pelosi's liberal agenda will take over the country!" But do any Democrats really think that these ads will stop without Pelosi in power? That Republicans will just throw up their arms and say, "Oh well, I guess we can't attack Democrats anymore"? No; the GOP will simply move on to the next-best bogeyman—probably Senate Minority Leader Chuck Schumer.
Furthermore, whoever Democrats pick to succeed Pelosi—even if it's someone eminently likable—will immediately become the target of Republican attacks and will suffer a popularity hit as a result. It is the other party's job to try to define its opponents in a negative way. It is one of the great paradoxes of politics that party leaders (at least in Congress) are always among the least popular members of that party—but that's a feature, not a bug. The very act of being in leadership makes you less popular. That's why it's tempting to always think that a party's congressional leader is the absolute worst choice for the job, but really no one else would do much better.
Others might argue that Pelosi's age (she just turned 77 in March) is holding Democrats back. But I fail to see why Pelosi's age matters to the average voter other than just being one of the ingredients in the Republican cocktail of discrediting her. This is not the United Kingdom; voters don't go to the polls to choose between Nancy Pelosi and Paul Ryan. They vote for the local candidates in their districts, and as long as Democrats nominate appealing individual candidates (and yes, youth/vigor can be an element of that), the age of the potential speaker of the House doesn't matter.
Nor do I really see anything for Democrats to gain by picking a dynamic new leader. Republicans basically tried this, switching from John Boehner to the young and likable Paul Ryan in 2015. As a result, Ryan's unpopularity shot up, and although his GOP did well in the 2016 congressional elections, I don't know anyone who says it was because of Ryan. The reality is that, in our president-centric system of government, it's just not clear that congressional leadership makes much of a difference in elections (again, apart from being convenient fodder for attack ads). Tim Ryan or Katherine Clark or whoever Democrats pick isn't going to zigzag the nation kissing babies and winning over voters. That's just not the role our legislative leaders play.
There's already a debate in political science over whether presidential elections are a referendum or a choice. Basically, even when the opposition formally agrees that Polly Tishan is going to be the face of their party, and even when Polly embarks on an exhaustive campaign schedule, half of political scientists still think voters are essentially just voting based on what they think of the incumbent president. So in a midterm election like 2018, what chance does the face of the Democratic Party have of convincing voters to cast their ballots primarily as a statement of support for him or her? Fundamentally, our system of government and our electoral culture does not lend itself to Theresa May-vs.-Jeremy Corbyn-style ideological and personal movements. The question of the 2018 election is likely to be simple and blunt: "Donald Trump—yes or no?"
Democrats can decide for themselves what to do about Pelosi. But they would be foolish to think that getting rid of her is a panacea. There is no Democratic House member ready to step in who already has a bulletproof national brand and won't be able to be defined negatively by Republicans. The other party is always going to find a way to demonize your congressional leadership. Electorally, they can never help you, and you should probably just accept that they are inevitably going to harm you. So both parties: stop picking (and picking on) your legislative leaders based on political considerations or popularity. Choose them for their actual job: their ability to cut legislative deals and govern effectively. At the ballot box, it absolutely will not matter one bit.
*I'm not even convinced that they have electoral problems, to be honest. Yes, eventually they will need to sort through their internal divisions to pick a 2020 presidential nominee and settle on a grand message to compete with Donald Trump's, but for midterm elections, just being the opposition party is often more than sufficient.