Let $\{Y_t\}_{t\in \mathbb Z}$ be a stationary process with mean zero. We know that the autocovariance function is given by:
$$\gamma_Y(h)= cov(Y_0, Y_{h})= E[Y_0\,Y_h]$$
We say that $\{Y_t\}_{t\in \mathbb Z}$ is ergodic for the second moments if
\begin{equation}\label{ergo-1}\tag{E}
\hat{\gamma}_Y (h):= \frac{1}{T-h} \sum_{t=h+1}^T Y_t Y_{t-h} \overset{p}{\to} \gamma_Y(h),\quad \forall h >0 \quad (T \to \infty).
\end{equation}
According to slide 48 of these lectures notes, a sufficient conditions for the ergodicity for the second moments is:
\begin{equation}\label{ergo0}\tag{CE}
\sum_{h=0}^\infty |\gamma_Y(h)| < \infty
\end{equation}
Now, let $\{X_t\}_{t\in \mathbb Z}$ be a stationary process with mean zero satisfying (\ref{ergo0}):
$$\sum_{h=0}^\infty |\gamma_X(h)| < \infty$$
(consequently, $\{X_t\}_{t\in \mathbb Z}$ is ergodic for the second moments)
Moreover, Let $N \sim \hbox{Poisson}(\lambda)$. Consider the same Poisson compounding process of this question:
$$Y_t = \sum_{j=1}^N X_{t;j}, \quad (t \in \mathbb Z)$$
Using this other question, we have that:
\begin{equation}\label{ac}\tag{ACV}
\gamma_Y(h) = \lambda E[X_0X_h]= \lambda \gamma_X(h)
\end{equation}
So, by the sufficient conditions for the ergodicity for the second moments, we have:
$$\sum_{h=0}^\infty |\gamma_Y(h)| = \lambda \sum_{h=0}^\infty |\gamma_X(h)| < \infty$$
This would show that $\{Y_t\}_{t\in \mathbb Z}$ is ergodic. However, following the same technique as the answer to the question already mentioned above, we can show that:
$$ \hat{\gamma}_Y (h) \overset{p}{\to} N \gamma_X(h), \quad (T \to \infty)$$
So, we would Not have that $\{Y_t\}_{t\in \mathbb Z}$ is ergodic ( see \ref{ergo-1} and \ref{ac} ), which would be a contradiction.
What's happening?