My ds' dad is a functioning alcoholic too. He hid it very well until after ds was born, then dropped his guard.
We lived together and it became obvious. Evenings out, he would drink so much, I wasn't able to wake him after I drove us home, and had to leave him in the car. He could have frozen to death some nights.
I could not leave ds in his care because I never knew if he was sober enough to drive. I couldn't trust him and I didn't want ds growing up thinking that level of drinking was ok so we left when ds was 2. I've never regretted it.
DS still sees his dad. Now 16, ds refuses to touch alcohol, although if we go out to dinner I offer him a glass of wine or cider or beer. I don't want it to have forbidden glamour. He won't touch any alcohol, so I assume at some point, he has seen the disgusting state his dad gets in.
You need to leave OP, and stay away. Don't waste your life or risk that of your child.
And incidentally, no court would give him full custody. With such poor health, he could never be trusted to care for a small child.