That’s an idea. The only problem is that you make a pretty big presupposition in saying the mother is by definition unfit in this dynamic.
If you can say ‘when the mother is unfit,’ it would be better. But the fact that a woman has an affair and cheats on her husband doesn’t necessarily make her an unfit mother to her child.
If she has an affair - cheats on the husband - and dupes him about the parentage, she is unfit.
Same goes for the father, of course.
In any case - if she doesn’t forfeit custody of the child, she should forfeit control over the money.