I avoid terrible hangovers by having a ritual after drinking: glass of water between drinks (especially if it’s tequila. People will look at you weird but screw them.), then some tea and some crackers or bread when I get home, essentially carbohydrates to absorb alcohol and do not fall asleep immediately. It’s a fight but at least it mostly works, I wake up mostly thirsty and not wishing I hadn’t woken up in three days. One thing is totally true: never ever in your life drink wine on a flight. That hangover is the worst. Never do that.