The thing that a lot of people ignore about The Simpsons is that it was originally ① a knock-off/variant of Life In Hell and ② a parody of typical TV at the time of its debut. This is pretty key to understanding the series.
If you aren't familiar with it, Life In Hell is a pretty rebellious comic for the post-Nixon era it premiered in. It's about a family of rabbit people (one of which, Bongo, is like Bart but more rebellious) and a gay couple and the not-so traditional shenanigans they got up to. Jokes typically tried to offend the rare traditionally-minded person who would read it: gay love, insulting the American flag (incorrect variants of the Pledge of Allegiance were a running gag), looking down on the work ethic, mocking basic American institutions and traditions, and so on. It could easily have been interpreted as anti-American if it wasn't made by the American writer Matt Groening (and eventually published in The New Yorker).
Groening eventually got contracted to turn it into animated shorts for The Tracy Ullman Show, but didn't want to go through with it. So instead, he made a knock-off of the rabbits and called them The Simpsons, which spun off into their own show.
The show ended up taking ideas from other sitcoms of the time and twisting them to fit the LIH sense of humor. Typical sitcoms had a father who knows best; Homer was an idiot who couldn't keep it together. Typical sitcom moms were calm and reasonable; Marge was nervous and overbearing. The sitcom son was a lovable kid who sometimes made mistakes; Bart was a brat purposely screwing things up. Sitcom daughters were ignorant of the world and learning from everyone else; Lisa was smarter than the rest of the family. (There was some interview with the creators some years later where they said they particularly hated Growing Pains and wanted to put it to shame.)
And that extended to the rest of the cast. Moe's tavern was a twisted version of Cheers, with Barney being a direct parody of Norm. (It's also not a coincidence that Kelsey Grammer was later hired to play Sideshow Bob, who was meant to seem like an insane Frasier Crane to audiences.) Doctor Hibbert was a parody of Bill Cosby's character from The Cosby Show. And there were other more subtle parodies here and there.
The Simpsons didn't fit in with the rest of TV, but that was an advantage that helped it succeed. And that worked for some time until something changed: the sitcom landscape became different. People didn't want the old hokey sitcoms anymore; they wanted ones like The Simpsons or Seinfeld. The world they were parodying died off, and the world they created became the norm. There was no basis for the jokes anymore aside from self-reference.
To make matters worse, a lot of the writing staff eventually left. Conan O'Brien got his own show, Matt Groening started work on Futurama, and several others left to either do Futurama or some other show. The writers got replaced with new writers who didn't get how to do the old style (given that they had no reference point in the wider world) and we got a bunch of cameo episodes and other unfunny junk.
On top of that, some elements of the series didn't age well. Hairstyles went out of fashion quick: Marge's blue beehive had already been gone from reality for about a decade by the first airing (and it was mainly an old woman thing), Bart's high-top and Lisa's liberty spikes were both 80s cuts, and a few supporting characters still had mullets and other dated cuts. The family's difficulty making ends meet looked less real as Homer's job became a high-salary occupation and their house became a near-mansion. (Check the floor plan online some time; it's ridiculously huge for a "poor" family's home.) And some characters simply don't fit the current state of the world.
Honestly, I really don't care that they got rid of Apu. The same people complaining about it often aren't watching it now, and quite often are not South Asian. If the South Asian audience isn't happy with the character, why keep him in? He's based on an old stereotype (shared mainly by people outside his demographic) that is rapidly being replaced anyways as South Asians move into other sectors of the economy and second generations become more commonplace. And nobody complained that hard about Maude Flanders being axed.
Nonetheless, the quality of the show has gone down, and not as a result of cast changes. It's a show out of its time, divorced from its initial comedic concept, and unable to bring itself to light the flamethrower of its original inspiration. Besides, it's a Gisnep product now. They aren't about to let Bart rebel like he's in hell.