Yes, it became more popular with Phelps, but the quality dropped.

Success called them out. Lost was actually kind of good till end of Season 3. Though Season 2 suffered the same from point 3, where they had 24 episodes with 8 episodes they had to spacefill.
IMHO, and i certainly can be wrong- the showrunners got upset when the fans guess what Lost was about then tried to change or obfuscate the theme.

The Blacklist went on for way too long, dragging a mystery box that they never really bothered to open for ten increasingly painful seasons.
It was always great watching Spader being the 'reasonable and nice" bad guy- a soft spoken gentleman, until he shot you.
But what ruined it for me was watching Keen ruin her life and destroy the lives of everyone she cared about in order to chase after some 'secret".

Writers who try to dance the fine line between “will they or won’t they” over a long period of time end up painting themselves into a corne
And then come the "shippers’ who want any two characters to get into a relationship- as long as it isnt happily married.
And Hollywood Writers also get sucked into writing creepy romances.
I -think- that the Scifi/SyFy original series “Eureka” would qualify. The first season ended with a partial story reboot via time travel, and the second had several pretty weak episodes (a trend that would accelerate IMHO). But the Third season premiere had higher numbers than the Second season.
The season two premiere drew 2.5 million viewers, making it the top-rated cable program of the day.[19]
…
The third season premiere was viewed by 2.8 million viewers, and the season 3.5 premiere of Eureka earned 2.68 million viewers in its new time slot.[21] The fourth season premiere was viewed by 2.5 million viewers.[22]
[ quote from the Wikipedia link cited earlier ]
As you see above the Fourth seasons had started to drop off, and the Fifth far more so. Which coincided with some terrible writing and semi-major cast changes. I’m not saying this is a perfect match, and I don’t have the time to dig in for more detailed watch numbers, but going by the premiere seasonal episodes, I think it’d match the OP’s request for a show increasing in popularity (Third season premiere vs. second) even though the the show was getting worse.
“Manifest” was great at first, and then kept going off on weirder and weirder tangents. I did stick it out to the end, however.

And then come the "shippers’ who want any two characters to get into a relationship- as long as it isnt happily married.
Lampshaded perfectly in Supernatural when the main characters find out there is fanfic shipping them as a couple. They are brothers if anyone doesn’t know.
Both Crime Story (one of the best Cops vs Mafia series ever) and Due South (a nice little niche series) went downhill in avalanche proportions after the first season.
Ditto for Twin Peaks.

Writers who try to dance the fine line between “will they or won’t they” over a long period of time end up painting themselves into a corner. If they keep on putting it off with increasingly improbable machinations, it soon becomes clear that they are just manipulating the audience for cheap laughs and will just piss viewers off. But once the characters finally confess and consummate their love a lot of the built-up tension can quickly flee the set like air from a leaky balloon. TV Tropes put it best:
Moonlighting was the ultimate will-they-or-won’t-they crash and burn. The show had far too many off-screen problems to survive much longer anyway, but the clumsy coupling of the two stars really turned off its fans.

Both Crime Story (one of the best Cops vs Mafia series ever) and Due South (a nice little niche series) went downhill in avalanche proportions after the first season.
I loved both those shows but you can’t say they got worse as they got more popular. Both struggled to find an audience. Due South had a very tumultuous run and was only in syndication the last 2 seasons. It also didn’t help that Paul Haggis was no longer writing the episodes.

This might be controversial, but I’d say Rick and Morty. I can’t quite place why, it could just been “around too long, ran out of ideas, ideas not as strong”, but I watched the last season once, and feel absolutely no need to watch it again
Good one. I wonder how many millions of times a person has told a friend “You’ve got to see R&M, it’s so smart and funny” and then next day “Yeah that wasn’t great…I don’t know what happened”.
It’s got to be the most self-indulgent show on TV at this point. They also seem to believe that if you make something confusing enough that it needs at least a re-watch to understand it, that makes it clever.

ETA: Interestingly, Game of Thrones stayed pretty steady till its last season when it fell off a cliff. I will never forgive Benioff and Weiss for that.
Yet the quality declined with every series after 4. People forget stuff like the sandsnakes and Arya surviving a disembowelling happened before that dreadful ending. I’d say it counts as an example for this thread, even if the reason for the decline is Benioff + Weiss can’t write.
I watched the first season of Due South when I was still living in Russia, where it was quite a hit. It wasn’t until I moved to Canada that I saw the decline in quality in seasons 2–4.

) and Due South (a nice little niche series) went downhill in avalanche proportions after the first season.
I disagree about Due South. It went downhill only after the detective sorta/kinda disappeared,.

I don’t know what you mean by the second. Examples?
One common pattern is Flanderization. I.e., take a popular character, but keep amplifying their stereotypical attributes until they’re a caricature of themselves. It’s directly driven by popularity (at first), not just time passing. Only after a while when the decline in quality becomes obvious does it negatively affect popularity.
That said, the specific example of Ned Flanders doesn’t fit here since the Simpsons steadily declined in popularity from the beginning. I’m fairly sure there are other examples where the two were correlated, though. solost’s example of The Fonz on Happy Days probably fits.

Moonlighting was the ultimate will-they-or-won’t-they crash and burn.
The industry took the wrong “Moonlighting lesson” from that. It’s not that pairing up a “will they or won’t they” couple caused it to crash and burn, it’s that 1) the characters were unlikable and 2) the show was sucking by then anyway.
The pairing didn’t ruin the show, the show ruined the show.
The second season opened fairly well, with Ben recovering from being shot, but I never had the same enthusiasm for the series as it progressed. Finally, the whole “Ray’s on a top secret, hush-hush undercover mission, so even his sister has to pretend the new guy’s really him” plot line was just plain stupid. The producers should have paid the man what he asked for and just kept going.

Yet the quality declined with every series after 4. People forget stuff like the sandsnakes and Arya surviving a disembowelling happened before that dreadful ending. I’d say it counts as an example for this thread, even if the reason for the decline is Benioff + Weiss can’t write.
Absolutely. I was hate watching from beginning of Season 7, with the mad Arya bit being stabbed in the stomach and running away, all of Jons lot going north to wall to walk two days - then run back in 10 minutes to get a 1000mph dragon to appear. There were too many to list, Tyrion turning stupid, Littlefinger going out like a drunk Ned Stark. Stannis too. Zigzag Rickon, ZIGZAG! Doran murdered while his guard watches. What the hell happened to Meera? Jorahs dragonscale cured by Sam? Olena and the Tyrells? Ayra and Sansas fake rivalry. Oh, I can’t be bothered…

Finally, the whole “Ray’s on a top secret, hush-hush undercover mission, so even his sister has to pretend the new guy’s really him” plot line was just plain stupid.
There i will agree.

Mission: Impossible. The first season, with Stephen Hill as Dan Briggs, was excellent: sharp, tight and well-written. I liked the fact that Briggs was a mastermind who planned and advised, but stayed away from the action, and that they brought in experts to help out. The show usually had some major snag in the plan, which they had to fix on the fly. As a small thing, I loved the way he looked at the dossiers at the beginning, and that they looked like dossiers, not glamour headshots.
Mannix was the same way. I suppose the Mannix character didn’t make much sense at Intertech long term, but the plots were better and Mannix had more naturally occurring obstacles since he had to take certain cases as part of his job.
The second season forward is much more formulaic. Mannix basically never made a wrong move or took on a questionable client, so a frequent plot element was him getting hit over the head or Peggy getting kidnapped. Finally, in the last season or two, they mixed it up more, Mannix would make a mistake once in a while and have to improvise.
Sherlock started out brilliantly, but it became very popular and got more fan-service-y as it went along. In the beginning, it was about a brilliant detective solving crime through excellent observance and deduction, but by the time it was over, it was absurdist/fantasy/Doctor Who/bromance. The last episode blew chunks.
I knew Happy Days would be one of the first. Once a show becomes formulaic or they go for the baby thing or Ted McGinley joins the show, it’s well beyond the peak of popularity.
Few shows go off “at the top” - Mary Tyler Moore perhaps. Any of the Bob Newhart shows (only watched the first) may have had that sensibility. I don’t recall any Norman Lear shows that overstayed their welcome.
Married With Children had both gone formulaic and perhaps fits the OP. At least it did get Ted McGinley. (eta: they did try the baby thing but Katey Segal had a miscarriage so that was just dropped and forgotten).
Quincy ME- started off as a mystery- solved by forensic science. Then it became a “cause of the weeK”. Then, thankfully- canceled.