A lot of states would have let the older child pick.
Yes, no good way for this to work out for the kids. The courts in MA did that in my family’s custody battle in 1974. We chose my dad but that caused a lifelong rift with my mother.
It would be really good if people sucked it up and tried harder to stay married. That said, if it is a case of mental or physical abuse, get out. But I suspect in most cases, it isn’t that.