I suspect that this is an empty threat anyway as most fathers would not know what to do with their children if they had them full time and also know that the children are better off with Mum.
However to answer your question the courts are more even handed now and as such fathers can get custody (residence).
What is important to the court is that the children have a safe, secure nurturing environment so it is not a question of money but who can provide that.Money can be dealt with by way of maintenance and other financial provision from the matrimonial assets. In addition the court knows that bringing up children is hard work.The needs of the childen have to be catered for, someone has to get them up, give them breakfast , get them ready for school etc, etc and hiring someone to do it is not considered a good substitute.The fact you had an affair does not count against you as a parent, the courts are aware that an affair can be a consequence as well as a cause of marriage breakdown.As such you have an extremely good chance of success.
I hope this helps. If there are any further points please reply