$\textbf{Question: }$ Suppose $X \xrightarrow{\phi} Y$ is a proper faithfully flat map of noetherian schemes and let $X \xrightarrow{f} Y' \xrightarrow{g} Y$ be the Stein factorization. Is either of $g$ or $f$ necessarily flat? I’d really like to see examples if these are false. In general, for a composite as above with $f$ faithfully flat, we have that $g$ is faithfully flat or flat iff $\phi$ is.

More generally, it seems like if $\phi = g \circ f$ is a factorization of a proper flat map with $g$ finite then $g$ is also flat. But I can't prove this.

This came up when I was thinking about how I would prove the connectedness principle in algebraic geometry (Let $X\rightarrow Y$ be a proper faithfully flat map with $Y$ the spectrum of a DVR. Then if the generic fiber is connected, so is the special fiber), and you can prove this with ZMT. The above result would give you a different proof. If $f$ in the Stein factorization above is faithfully flat then so is $g$ (by general properties) but because the generic fiber is connected $g$ is also an isomorphism on an open set, hence an isomorphism.

Googling around shows that it also came up in the comments here Global sections of flat scheme also flat? but without a resolution.