Does $\int_0^{2\pi} e^{i\theta(t)} (\phi(t))^n dt=0$ $\forall \; n\in\mathbb{N}_0$ imply $\phi$ periodic?
I missed the real analyticity condition (my comment makes perfect sense for $C^\infty$ though), so let's move points in a fancy way to satisfy it.
First, observe that if $a_0,a_1,a_2$ are positive reals close to $1$, then there exist unique $\theta_1\approx \frac {2\pi} 3$ and $\theta_2\approx \frac {4\pi}3$ such that $a_0+a_1e^{i\theta_1}+a_2e^{i\theta_2}=0$. Moreover, $\theta_{1,2}$ are real analytic functions of $a_{0,1,2}$ in some neighborhood of $1$. This is just the implicit function theorem.
Now choose your favorite $2\pi$-periodic real analytic function $F(\tau)$ with uniformly small derivative that is not periodic with any smaller period (say, $\varepsilon\cos\tau$) and put $t(\tau)=\tau+F(\tau)$. Then $\tau$ is uniquely determined by $t$ and the dependence is real analytic as well.
Next define $\theta_{1,2}(\tau)$ by $\theta_j(\tau)\approx \frac {2\pi j}3$ such that $$ t'(\tau)+t'(\tau+\tfrac{2\pi}3)e^{i\theta_1(\tau)}+t'(\tau+\tfrac{4\pi}3)e^{i\theta_2(\tau)}=0 $$ Everything is real analytic so far.
By uniqueness, we must have the relations $\theta_1(\tau+\frac{2\pi}{3})=\theta_2(\tau)-\theta_1(\tau)$ and $\theta_1(\tau+\frac{4\pi}{3})=2\pi -\theta_2(\tau)$. Thus $\theta_1(\tau)+\theta_1(\tau+\frac{2\pi}{3})+\theta_1(\tau+\frac{4\pi}{3})=2\pi$. This implies that there exists a real analytic $\Theta(\tau)$ such that $\Theta(\tau+\frac{2\pi}3)=\Theta(\tau)+\theta_1(\tau)$ (just divide the Fourier coefficients by appropriate numbers to get the periodic part and add $\tau$; note that the identity for $\theta_1$ implies that $\widehat\theta_1(3k)=0$ for $k\ne 0$, so no division by $0$ will be encountered). Then, automatically, $\Theta(\tau+2\pi)=\Theta(\tau)+2\pi$ and
$$
\Theta(\tau+\frac{4\pi}3)=\Theta(\tau+\frac{2\pi}3)+\theta_1(\tau+\frac{2\pi}3)
\\
=\Theta(\tau)+\theta_1(\tau)+\theta_1(\tau+\frac{2\pi}3)=\Theta(\tau)+\theta_2(\tau)
$$
Hence, we have the identity
$$
\sum_{j=0}^2 t'(\tau+\tfrac{2\pi j}3)e^{i\Theta(\tau+\frac{2\pi j}3)}=0
$$
We can now pick up any $\frac{2\pi}3$-periodic real analytic function $\Psi(\tau)$, multiply the terms by the corresponding values of $\Psi^n$ (they are equal), integrate in $\tau$ from $0$ to $\frac{2\pi}3$, and use the standard change of variable formula to get
$$
\int_0^{2\pi} e^{i\Theta(\tau(t))}\Psi(\tau(t))^n\,dt=0
$$
but $\psi(t)=\Psi(\tau(t))$ is no longer $\frac{2\pi}3$ periodic in $t$ because the composition kills periodicity.
As I said from the beginning, "there are many fancy ways to move six (well, even three) points around the circle and keep the sum balanced".