I see you've never had a young child. What you're talking about is something that doesn't work with children under 3. And tbose children are very mobile, boundary test and don't really understand death.
My 1 year butt checked a fireplace and got a 3rd degree burn. She understood what hot was. That heat could hurt her. Still burnt her butt when I wasn't looking and the worst part was the urgent care told me it was a common occurrence. I believe them because they guess exactly how it had happened.
My 2 year old nearly drowned. It was only a fence that stopped her from jumping into a pool when I wasn't looking. I found her right outside it after desperately wondering where she had gone. She'd been in a pool plenty of times and even knew she could sink. Didn't matter.
I can have frank discussions with my nearly 5 year old, but that was really recent. Even when she was just 4 just explaning and exposure wasn't alaays effective. It's easier to just lie for their safety.
And hell it must work because I still remember the stories my dad told me about the monster called Undertow that would carry you out to sea. I of course know it's a real thing, but I think it's telling I think of the story before the factual information and I heard the story over 25 years ago.