This is related to Prove that there exists $f,g : \mathbb{R}$ to $\mathbb{R}$ such that $f(g(x))$ is strictly increasing and $g(f(x))$ is strictly decreasing.
But according to the proof of Ewan Delanoy, you must use a $p(x)=kx$, $q(x)=-kx$, where $k\neq1$, otherwise the iterative group is trivial, then the proof failed. I think it is still possible to construct such $f,g$ that their compositions are exactly $y=\pm x$.