When $f(x) = g(y)$ for almost every $(x,y)$, must $f$ and $g$ be constant almost everywhere?

Ok, after a year of struggling with this I finally think I have an answer! Figured I should post for whoever else is curious: it does follows that $f,g=\lambda$ a.e. for some $\lambda$.

First off, without loss of generality we can assume $f(x),g(y)\in[0,1]$ for all $x,y$. If not, just compose them with $h(s)=\frac{\tan^{-1}(s)+\pi/2}{\pi}$; since $h$ is injective, $h\circ f=$ constant a.e. implies $f=$ constant a.e.

Let $$B_{n,b}=\{x\in[0,1]:\text{the nth binary digit of x is } b\},$$ for $b=0,1$, $n\ge1$. Let $F_{n,b} = f^{-1}(B_{n,b})$ and $G_{n,b} = g^{-1}(B_{n,b})$.

Claim: For each $n$, we have either $F_{n,0}\times G_{n,0}$ is full measure, or $F_{n,1}\times G_{n,1}$ is full measure. To see this, first note that both $\mu\times\nu(F_{n,0}\times G_{n,1})$ and $\mu\times\nu(F_{n,1}\times G_{n,0})$ are zero since they are subsets of $\{f(x)\neq g(y)\}$. These, combined with $F_{n,0}+F_{n,1}=\mu(X)>0$ and $G_{n,0}+G_{n,1}>0$, show that $$ \mu(F_{n,0})>0\implies \nu(G_{n,1})=0\implies \nu(G_{n,0})>0\implies \mu(F_{n,1})=0 $$ and $$ \mu(F_{n,0})=0\implies \mu(F_{n,1})>0\implies \nu(G_{n,0})=0. $$ Thus, either both $F_{n,0}$ and $G_{n,0}$ are full measure, or both $F_{n,1}$ and $G_{n,1}$ are, proving my claim.

Let $b_n$ be the bit for which $F_{n,b_n}\times G_{n,b_n}$ is full measure. Then $$\bigcap_{n\ge 1}F_{n,b_n}\times G_{n,b_n}=\left(\bigcap_{n\ge 1}F_{n,b_n}\right)\times \left(\bigcap_{n\ge1}G_{n,b_n}\right)$$ will have full measure as well, implying both $\bigcap_{n\ge 1}F_{n,b_n}$ and $\bigcap_{n\ge 1}G_{n,b_n}$ are full measure. But these are precisely $f^{-1}(\lambda)$ and $g^{-1}(\lambda)$, where the $n^{th}$ binary digit of $\lambda$ is $b_n$. Thus, both $f^{-1}(\lambda)$ and $g^{-1}(\lambda)$ have full measure, so $f(x)=\lambda$ a.e. and $g(y) = \lambda$ a.e, with respect to $\mu,\nu$.

If this proof is wrong/needs clarification, please comment!