Interesting topic. I like some anime but have been able to notice a lot of more problematic ones as I got older, not sure if it's just been more prevalent lately or I can be more objective about it. I will say that at the very least the pedo/infantilsm and general sexual assault "gags" are way more prevalent in anime than pretty much anything in Western animation. It can be not so subtle like outright groping (Fire Force comes to mind) or more subtle with the female cast having larger eyes or super low cut skirts (...several come to mind).
Even anime that I would find usually fun or at least watchable otherwise tends to shove it in somewhere (MHA, Fairy Tail, Black Clover, Food Wars, Kill la Kill, and many more), whether it's a Mineta-style pervert who is played for laughs and won't fcking stop, or the inevitable hot spring episode where all the guys suddenly have to go peeking, or the summer episode where we have to see every skimpy swimsuit (always on the gals) with plenty of commentary. Mind that pretty much all the aforementioned characters are high school age or less and would be considered minors and it gets even more skeevy. And most of the ones I just mentioned are both somewhat recent and popular.
Now, there is plenty of good anime where I can go the whole series without seeing anything of the sort, but that's far less common than it has any right to be. And since some of it is ongoing, there's always the chance...
Western animation definitely has the blood/gore and gun fetish on lock though, no one should argue that. There's some reasonably heavy stuff like that in anime, but I can find x5 more on the Western side easily.
Minority representation is honestly pretty terrible on both fronts, while Western is probably better overall the bar is still very, very low so I'm not gonna pat Western on the back about that. LBGT+ representation is in a similar boat.
That being said, basing anime vs ALL of Western media doesn't seem quite right to me since we don't have an exact parallel.