Let's try to see what $(e^a)^b$ means first:
Well, $(e^a)^b= e^{b \cdot \ln(e^a)}$, by definition. Now, if only it were true that $\ln(e^a)=a$ then we would be happy, and $(e^a)^b$ would be our familiar $e^{ab}$.
Now, let $a=x+iy$ where $x,y$ are reals.
Then, $e^a=e^x \cdot e^{iy}$. What is $\ln(e^a)$ then?
It should be $\ln(e^x)+\ln(e^{iy})$. There are no problems with $\ln(e^x)$, as $x$ is real.
However, lot of care must be taken while dealing with complex logs.For example see here. A brief reason is because $e^{iy}=e^{i(2\pi+y)}$, we are in a spot of bother. (This point is very well taken in your question).
So, there is no problem with the formula $(e^a)^b=e^{ab}$ if $a$ is real. The troubles begin when $a$ is complex, for the reasons mentioned above.
Thuus the answer to your question is that the formula hols for real $a$ and any $b \in \mathbb{C}$.