Yes, it's called evolution the kid that can't figure out he is doing something very dangerous does't end up having children of his own.
I know this sounds very harsh but it's not like there is another way to teach this to children. They need to figure it out on their own.
All parents wish they could wrap their children in cotton but the reality is they can't do that forever it's best children lern about risk early.