I suppose it would depend on the laws of the particular state, or country, but wouldn't this guy be able to marry someone with an ironclad pre-nuptual agreement specifying custody rights and compensation in event of seperation or divorce? If the woman already gave birth before the marriage, it is pretty easy to adopt your step-child. If not, and he is incapable of fathering his own child, then any child born to them during wedlock would still be his child even if it was the result of adultery (according to some state laws).
If the child is not his biological offspring it would be possible for one or both of the bio parents to make custody claims in the future, regardless of what is agreed on before the fact.
I think the only way this guy would get what he wants is through marriage + divorce + full custody.
For the morality aspect .. what's the problem? Unless the guy really is a pervert it sounds like any child he raises will have a great start in life.
I don't think many people are actually qualified to be trusted with the responsibility of raising children. This man at least is ready and willing and eager to raise a child. Many parents are not ready. Many parents are not even willing or eager to raise a child, and it becomes a "burden" to them that affects their own quality of life and the quality of their interaction with their children.