Counterexample:
Let $\lbrace e_i \rbrace_{i\in I}$ be a Hamel basis, a basis for $\mathbb R$ over $\mathbb Q$, which means every real can be written uniquely as a finite linear combination of the basis elements with rational coefficients. The set of indices $I$ is uncountable. Choose a particular basis element $e_0$ (which might be taken to be $1$). Let $f$ assign to $(z,y,x,w,v,u)$ the coefficient of $e_0$ in the expression of $z$ as a rational linear combination of the Hamel basis. Then $f$ is discontinuous (it only takes rational values) and therefore not linear over the reals, but it satisfies $\operatorname{Avg}(f) = f(\operatorname{Avg})$ because it is $\mathbb Q$-linear.
There are foundational issues. I can't write down a Hamel basis, but one exists if you assume the Axiom of Choice. See this questionthis question.
If you assume that $f$ is continuous, or just measurable then it must actually be linear.