Velvet is right James!
You won’t get answers to legal issues here. Every country has its own laws in relation to child custody and marital breakdown. However, I think it is very helpful for you to express all your feelings and concerns surrounding this disconcerting matter.
The mother /child relationship is a very strong bond and in most cultures it is almost revered. Irish Law always gave the mother priority custody until recently. Now the father’s rights are taken into consideration more which is a good thing (sometimes). I worked with “disturbed” children for 5 years . Of course it was mainly the parents who had problems and it was manifested in the children’s behaviour. I saw children from very troubled backgrounds having decisions made for them by court judges which often shocked me. The only advice I would give you is to keep your business strictly between yourself and your lawyer until decisions are made. Involving extended family members will create emotional responses and arguments which may be picked up by your daughter. She is at a very sensitive age for change. Try to keep her routine as normal as possible to protect her from this trauma.
As a mother I would say your wife should be the primary carer of her baby.
As a CG, I would say “don’t gamble with your child’s safety”!!!
With the best of intentions the CG aspect of your wife’s personality could over rule her intentions to be the best mother in the world!
Ensure your lawyer knows ALL her CG history. You will need documented evidence!
I feel very sad to see what gambling has done to your little family!