[guided]The only point that needs care is that the factor identity may hold only almost everywhere, not pointwise everywhere. We therefore record explicitly where the exceptional sets are, and we also use that $T$ is measure-preserving so that null exceptional sets stay null after pulling them back along iterates of $T$.
Fix $n\in\mathbb N$. Let $N\in\mathcal B_X$ denote the exceptional set where the one-step factor identity fails:
\begin{align*}
N:=\{x\in X: \pi(Tx)\ne S(\pi(x))\}.
\end{align*}
The factor relation says exactly that $\mu(N)=0$. Since $T$ is measure-preserving, for every integer $\ell\ge 0$ we have
\begin{align*}
\mu(T^{-\ell}N)=\mu(N)=0.
\end{align*}
For each time $j\in\{0,\dots,n-1\}$, define
\begin{align*}
E_j:=\bigcup_{\ell=0}^{j-1}T^{-\ell}N,
\end{align*}
with $E_0:=\varnothing$. This set removes precisely the points whose orbit hits the one-step exceptional set before time $j$. Because it is a finite union of null sets, $\mu(E_j)=0$. If $x\in X\setminus E_j$, then $T^\ell x\notin N$ for every $\ell\in\{0,\dots,j-1\}$, so the identity $\pi(T^{\ell+1}x)=S(\pi(T^\ell x))$ holds at each of those orbit points. Induction on $\ell$ gives
\begin{align*}
\pi(T^j x)=S^j(\pi(x)).
\end{align*}
Since there are only finitely many times in the block, the set
\begin{align*}
E_n := \bigcup_{j=0}^{n-1}E_j
\end{align*}
also satisfies $\mu(E_n)=0$.
Now fix a word $a=(a_0,\dots,a_{n-1})\in\{1,\dots,m\}^n$. The atom of the $S$-block partition with name $a$ is
\begin{align*}
A_a := \bigcap_{j=0}^{n-1} S^{-j}(Q_{a_j}),
\end{align*}
and the atom of the pulled-back $T$-block partition with the same name is
\begin{align*}
B_a := \bigcap_{j=0}^{n-1}T^{-j}\bigl(\pi^{-1}(Q_{a_j})\bigr).
\end{align*}
For $x\in X\setminus E_n$, membership in $B_a$ means that $T^j x\in \pi^{-1}(Q_{a_j})$ for every $j$, equivalently
\begin{align*}
\pi(T^j x)\in Q_{a_j}
\end{align*}
for every $j\in\{0,\dots,n-1\}$. On $X\setminus E_n$, we may replace $\pi(T^j x)$ by $S^j(\pi(x))$, so this is equivalent to
\begin{align*}
S^j(\pi(x))\in Q_{a_j}
\end{align*}
for every $j\in\{0,\dots,n-1\}$. That condition is exactly $\pi(x)\in A_a$, or $x\in \pi^{-1}(A_a)$. Hence $B_a$ and $\pi^{-1}(A_a)$ agree outside the null set $E_n$, so
\begin{align*}
\mu\bigl(B_a\triangle \pi^{-1}(A_a)\bigr)=0.
\end{align*}[/guided]