Wow, Sasha, you certainly do have some interesting issues come up.
I can relate to how you must be feeling. I think I'd be feeling the same way. Is this one of those "big changes" they suggest avoiding during early sobriety?
Of course, that's a moot point because your ex isn't sober--he's still a total mess in the addiction department.
I'd suggest just trying to divorce the trans issue from everything else, since he's such a mess otherwise. If he were sober, he could be a good parent regardless of gender, but by the same token, as a drunk his parenting will suck regardless of gender. I think if I were you, I'd just keep a laser-like focus on the drinking and associated behavior and risk.
And I don't think it's something that would necessarily be obvious even in retrospect to a former spouse. Many trans people go to great lengths trying to fit in before deciding they can't or no longer want to.