Doesn't Endgame literally have Thanos being decapitated? I don't think it'll scar most kids but I don't remember any decapitations happening in the Dark Knight movies.
I still remember Simba's dad falling and being trampled to death by gnus, when I was 5.
I don't think that traumatised me or my friends. It can be good for kids to see sad things happening in movies, so they know it's not weird if something sad happens to them.
A quick, clean decapitation of a bad guy is hardly going to set a permanent mark. Nobody cared when Scar also died at the end of said movie.
When I was a young kid, I hated Disney movies. The villains were always too mean and scary for me (I still hate Ursula), and besides that, those movies had too much drama that made me feel extremely anxious. My aversion to violence and sadism in media wore off eventually, but is that good? Maybe I was just excessively sensitive as a kid and needed to be exposed to even more stuff like that even earlier on. I'm not sure about that, but I don't have much fondness for those movies even in retrospect.
My seven and four year old girls definitely understood what the hungry hyenas were doing; but then, I've never really sheltered them from the horrors of nature.
I wonder how it works psychologically. Even in Avengers, the "good people" turning into dust clearly affected the audience much more than "the bad people" being killed in various ways during the movie.
Media that highlights this dynamic is interesting, though it implies some fourth-wall breaking. Funny Games did it (and I hated it, but it was interesting.) Sometimes video games do it too; Metal Gear Solid criticizes the player for enjoying all the killing.