Since men make more than women generally, if the nth percentile earning woman marries the nth percentile earning man, then the man will make more money, yes. That also means that if they divorce, the woman may take out more dollars than she put in. In the less common scenario where then woman makes more, though, she will take out fewer dollars and may have to pay spousal support going forward.
Meanwhile, custody of children in most jurisdictions is in fact gender neutral, and based on the best interests of the child. However, since more often the mother is the primary caregiver (whether stay-at-home or working full time), courts more often grant custody to the mother.
The first problem would be solved by eliminating gender wage disparities. The second problem would be solved by men providing more of the childcare during the marriage.