Let $X$ and $Y$ be compact spaces and let $C(X)$ and $C(Y)$ be the corresponding spaces of continuous, real-valued functions. Suppose $T\colon C(X)\to C(Y)$ is a non-linear bijection such that
$$fg = f^2 \iff (Tf)(Tg) = (Tf)^2\qquad (f,g\in C(X))$$
Once can deduce (see Lemma 3.1 here) that
(#) if $fg = 0$, then $(Tf)(Tg) = 0$ and in this case $T(f+g) = Tf + Tg$.
Addendum: One can prove that the condition concerning preservation of the relation $fg = f^2$ in both ways is equivalent to $T$ and $T^{-1}$ satisfying (#), which may make the picture cleaner.
Suppose that $(f-h)(g-h) = 0$ constantly. Do we have $(Tf-Th)(Tg-Th) = 0$?
The motivation comes from the fact that I'd like to simplify/amend considerations in the linked preprint. Maps $T$ with this property need not be continuous, but I am happy to assume continuity, or something else, if that helps.
The condition you wrote is not valid.
Let $\preceq$ be the compatibility ordering in your paper.
Let $X=Y=[-2,2]$. Let $u(x)=\max(0,1-|x|)$ and $v=-u$. (The graph of $u$ is looks like a triangle above $0$.)
Define $T\colon C(X)\to C(Y)$ as the $\preceq$-isomorphism which "interchanges $u$ and $-u$".
Formally,
Let $f(x)=\max(1-x,0)$, $g(x)=\max(1+x,0)$. Then $u$ is always equal to either $f$ or $g$, which means that $(f-u)(g-u)=0$. However, $(T(f)-T(u))(T(g)-T(u))=(f+u)(g+u)$ is non zero (at $x=0$ its value is $4$).
However, $T$ is not continuous wrt to any of the usual topologies on $C(X)$.