Probably, but it would have kept them safe. Imagine you left a live wire exposed in your living room and you sternly warned your toddler to avoid it, telling him about the danger of death via electrocution. You leave the child alone in the living room, and go to the camera room to see what action your child would take. Let’s say your toddler approaches the exposed live wire, reaching out to grab hold of it, will you sit there and let your child experience the consequence of disobeying you or you quickly dash to the living room to save your toddler from impending death?
If he knew this, then what was the point of creating everything good. You make God seem like a psychopath. That’s terrible parenthood.
That was a crappy solution since it would not benefit all of mankind (although it could). The best solutions would have been not to place the tree of good and evil in the garden (at least early on in their lives) or punish Adam and Eve but spare their descendants.