If he wants custody and has a more capable household than she does, I wouldn’t object to granting it — since the intent wasn’t to be a sperm donor even though he picked a method known sometimes to fail. Still the older laws which would have smacked both for adultery would have made sense too. And from a celestial point of view, he and she deserve what they get when they do things like this that screw their own souls.
judges don’t look celestial.
judges look for the lie.
she lied.
she lied to become pregnant.
she lied to accomplish mercenary goals.
the children were just a means to an end.