It’s also possible that the story is like a parable, meant to teach that God is willing to destroy evil but save the good, and will create promises to never hurt that which could be good. It doesn’t have to be literal, does it?
The rest of Genesis is understood as history, and there’s no linguistic reason to interpret Gen 1-11 as anything but history. That was the accepted interpretation until people decided to start reinterpreting it through the lens of Darwin, but there was no real reason to do that.
There’s nothing to suggest it is a parable. It’s in a narrative section and book. The text never mentions anything about a parable. I guess you could take any passage of scripture and allegorize it away anyway you want to avoid the obvious factual content being disclosed. But it’s not a legitimate method of exegesis.