Your solution of banning male immigration makes perfect sense to me. Maybe not ban it entirely but at least ensure a 1-1 ratio of men to women (male surplus has a tendency to turn countries into shitholes).
Disallowing someone from immigrating is not a punishment because there is no right to immigration anyway. In fact I believe we should go even further and see immigrants as investments. If the immigrant is unlikely to have a net positive tax contribution (or at least not being a rapist, for a more realistic target), I don't see any reason to allow him or her to be here. If you accept this idea, there is nothing wrong with training a neural network on characteristics of existing immigrants to predict the future value of a particular potential immigrant.
Disallowing someone from immigrating is not a punishment because there is no right to immigration anyway. In fact I believe we should go even further and see immigrants as investments. If the immigrant is unlikely to have a net positive tax contribution (or at least not being a rapist, for a more realistic target), I don't see any reason to allow him or her to be here. If you accept this idea, there is nothing wrong with training a neural network on characteristics of existing immigrants to predict the future value of a particular potential immigrant.