I have done a fair amount of research on this and the one I settled on was high5 4:1 for the roof of africa (but that was abou 7hrs of riding each day)
For long events you want some protein in the mix, and fructose rather than sucrose. I have never heard of caffeine dehydrating you but I suppose with it being a diuretic it may get fluid to your bladder a bit quicker (FYI at the roof I drank float to 9 litres without needing a pee) but I wouldn't recommend a caffeine based drink. Rather a caffeine based gel or goo
What the caffeine does is help to keep your stomach digesting. When you are doing heavy exercise your body sort of shuts down some of its functions (in simple terms lol) which is why you can sometimes feel bloated from the energy drink. The caffeine keeps your stomach working and In turn helps get whatever you have in the drink (electrolytes energy etc) it back into your bloodstream. I used to take the caffeine goo later in the race also gives a bit of a pickmeup