I don't know if you're still interested now that the average collapses, but I think that there is such a maximizing invertible ergodic $T$ as long as you assume that your probability space is Lebesgue.
Under these assumptions, if you normalize so that the median of $f$ is $0$ (i.e. so that $\mu(f < 0) = \mu(f > 0)$), then I think the maximum value of your quantity
$\int |f - Tf|$ is given by $2 \int |f| dx$.
It's clear from the triangle inequality that for every measure-preserving $T$, $\int |f - Tf| \leq \int (|f| + |Tf|) = 2\int |f|$.
Now we want to find $T$ for which $\int |f - Tf| = 2\int |f|$.
Define $Z = \{x \ : \ f(x) = 0\}$, $N = \{x \ : \ f(x) < 0\}$, and $P = \{x \ : \ f(x) > 0\}$. If $Z$ has positive measure, split it arbitrarily into $Z^+$ and $Z^-$ of equal measure (since we assumed $\mu$ is nonatomic). Define $P' = P \cup Z^+$ and $N' = N \cup Z^-$. Then $\mu(P') = \mu(N') = 1/2$, and $f$ is nonnegative on $P'$ and nonpositive on $N'$.
I claim that any measure-preserving $T$ with $T(N') = P'$ and $T(P') = N'$ works.
For such $T$, and for every $x \in N'$, $Tx \in P'$, meaning that $Tf(x) - f(x)$ is nonnegative. Similarly, for every $x \in P'$, $Tf(x) - f(x)$ is nonpositive. Therefore, $\int |f - Tf|$ is
$\int_{N'} (Tf - f) + \int_{P'} (f - Tf) = \int_{N'} Tf - \int_{N'} f + \int_{P'} f - \int_{P'} Tf = 2 (\int_{P'} f - \int_{N'} f) = 2 \int |f|$. (The second-to-last equation follows from the fact that $T$ is measure-preserving.)
Now we just need to justify that there exists an invertible ergodic $T$ with $T(P') = N'$ and $T(N') = P'$, but this should be easy. Just find a measure-preserving bijection $S: P' \rightarrow N'$ ($P'$ and $N'$ are positive measure subsets of a Lebesgue space, and so are also Lebesgue and thus isomorphic as probability spaces) and any invertible ergodic map $R: P' \rightarrow P'$. Finally, define
$T(x) = \begin{cases}
S(x) & n \in P' \\
RS^{-1}(x) & n \in N'
\end{cases}$
Since $T^2$ restricted to $P'$ is just $R$, for every positive measure subset $A \subset P'$, $\bigcup_n T^{2n} A = \bigcup_n R^n A = P'$ by ergodicity. Ergodicity of $T$ should follow almost immediately.