Hi Feelhopeless, I'm so sorry you are in this situation, I know it's very painful.
Well, you tried to do what is best for all and unfortunately that didn't work on your first try.
I'm thinking it might be a good idea to contact a lawyer that specializes in addictions. I just googled - divorce lawyers specializing in addiction - and found a few in my city, hopefully you will locate some too.
The reason I suggest this is that while the court may not care if he cares for your children drunk, there is a possibility that you could stipulate that he have a zero blood alcohol level when visiting with the children. I hope that perhaps you have documented some of his behaviour (or that he has been to detox a few times, maybe rehab etc etc), but regardless, it would absolutely be worth talking to a specialized lawyer, they will have all the facts.
There is a service called Soberlink, one of you would have to pay for the service (hopefully him, another thing to discuss with a lawyer).