Is the implication here that this is not already the case? I think you are marginalizing the many variable preferences that people have when choosing partners. There is no general set of optimal human traits.
>...leaving out a vast majority of males. Men would either have no reason to be productive members of society or would become violent.
This is very perplexing. Men do a lot more than just make babies, so why then would their productivity disappear if they cant make babies anymore. "Uh, hey ma,n we cant have kids anymore so lets go rioting?"
>Marriage came to be as a way to essentially harness productivity by eliminating most conflict over mates.
Uhh I guess, sure I can concede that.
>I still think religion as an institution is important because it binds a society together under shared beliefs.
I am also agnostic and I agree that religion is important however not for the same reason you do. Yes religions bind societies but only to a certain extent and for only so long. See the conflicts between early Christians and Jews, or the conflicts between Protestants and Catholics. Or current extremist Muslims, hell extremists of every religion. As much as religion binds people together it even more so tears people apart.