The problem with these two games you are using as examples are:
All the plot relevent NPC's are immortal... and so are any and all children.
So, it's not really an "anyone can die" it is "anyone without plot armor can die". So, it doesn't really fit the same description as what I was talking about.
Well, unless we're going back to much older games where literally anyone could die and it would result in a "I need to restart the whole game since I can't complete it anymore". Which is probably a discussion on why anti-frustration features are good.
Still, I'm talking more about the "narrative" having anyone die, rather than the gameplay (story versus gameplay). Especially since the thread is about "should good people suffer?".
It can make them more careful. Or, it could make them resort more to "guides". "If this NPC dies, do I lose anything useful or valuable? No, okay, then it doesn't matter.".
If we're talking in terms of gameplay, you still have to be quite careful in your game design. Some players might also resort to savescumming at any and all quest junctures to get characters to live, or to prevent deaths... or whatever.
If you don't mind your player doing those things, then they're fine. If you feel like that kills immersion for a player and keeps them from connecting to characters and thus caring on a personal level whether they die... then it's sort of a bad idea to allow "anyone to die" since the player will be saving them out of "mechanical necessity" than anything else.
This is what you have to be very careful about. There's a reason that it's a niche crowd who like the Fate/Stay games. Spoiler Warning for that whole series: Pretty much everyone dies in it, and those who don't, are so badly off that death would be a mercy for them. Dangan Ronpa, on the other hand, usually has a "hope spot ending" where our protagonist and maybe a small group survive despite the "death game" everyone is playing. But, even that series can turn people off quite a bit. Heck, narratively in the first Dangan Ronpa, I was pretty much sure the only survivors were going to be our point of view character and the "I R So Mysterious" girl after like Episode 3. Which... affected my enjoyment of any other character negatively. Made their drama worthless. "Why do I care about the connections these characters have with each other? They're all going to die other than these two anyway. So, I'm not going to get invested in Dead Meat."
If we look at "Blue Gender" as an anime where "anyone can die"... well... that anime, despite my thinking it was good, basically resulted in the same attitude. I knew our main character and the woman escorting him around would never die... but everyone else was subject to death at any time... so... I didn't care about any of the other characters or their plights. After all, they were "Dead Meat". They existed as "cheap emotional attachment". Much like Clemantine in The Walking Dead (who's only purpose was to pull the heart strings of people and invest them in an otherwise very terribly written narrative with extremely unlikable characters. The fact that she's an innocent little girl also gives her a pass by so many audiences for being a literal Mary Sue. A perfect child, essentially, and that didn't creep anyone out except me, apparently).
When you write "anyone can die" stories, you do have to be incredibly careful. Otherwise, you risk people actually not giving a crap about your characters to begin with. You risk having players not care about protecting a character you thought they would (I will never care about any character in a game where they are part of an Escort Mission. I will actively wish for their death to get me out of that sort of annoying and terrible gameplay).
Want to know something fun?
Resident Evil 4. I hated Ashley. So much. I had to babysit her and it was never fun, or pleasant, or interesting. Her personality didn't endear me to her. Because, no matter "how cute and flirty" she was or "how kind and interesting" she pretended to be... I had to protect her... and it made it very difficult to enjoy her presence at any point.
Meanwhile, I loved Elizabeth in Bioshock Infinite. She was never in the way, I never had to defend her, she helped me, and despite the outright terrible stuff she does, she was still endeared to me. Because she couldn't die. Because she was useful.
Here, I'll give you an anime of "anyone can die" and I bet if I spoil it early for you, you won't watch it... and if you get to the end, you'll be pretty annoyed: "King's Game". Anyone can die. Including our point of view character.
Everyone dies at the end and the mystery isn't solved.
Emotional payoff for a character only works if you don't think that character is ever going to die. If you know they're going to die right at beginning... you won't invest in them. At all.
Humans generally avoid pain. If it's painful to get invested in a character you know is dead... why would most people do that? Likewise, if the only reason they're engaged in the narrative is that singular person and... you kill them... do you REALLY think they'll continue playing the game? Watching the show? Reading the book? The answer is usually "no".
Deaths have to be purposeful, earned, and land right. Killing a character is a tool. In the hands of a bad author, it sucks. In the hands of someone skilled at the craft, they ALWAYS hit hard, even if the character that dies is despised.
Death for "cheap thrills" is a dangerous path to walk. Very difficult to get long term investment out of it from anyone other than people who like to watch the pain and suffering of others.