This question is a by-product of this one. I'm asking it because of this comment by Tara B.
I'll repeat the definitions. The full transformation semigroup $\mathscr T_X$ on a set $X$ is the semigroup of all functions from $X$ to $X$ with composition as the semigroup operation. $\mathscr J$ denotes the equivalence relation on $\mathscr T_X$ given by the formula $(\phi\mathscr J \psi)\iff (\mathscr T_X\phi\mathscr T_X=\mathscr T_X\psi\mathscr T_X),$ which means that two transformations are $\mathscr J$-related iff they generate the same two-sided ideal.
It's one of Green's relations, which are important in semigroup theory. It is a theorem that $\mathscr J=\{(\phi,\psi)\,|\,\operatorname{rank}(\phi)=\operatorname{rank}(\psi)\},$
where $\operatorname{rank}(\phi)$ denotes the carinality of the image of $\phi.$ By $J_\phi,$ we denote the $\mathscr J$-class of $\phi.$ Then we have $J_{\operatorname{id}}=\{\phi\,|\,\operatorname{rank}(\phi)=\operatorname{card}(X)\}.$
In the linked question I expressed my intuition that if $X$ is infinite, then every transformation of $X$ can be expressed as a composition of transformations in $J_{\operatorname{id}}.$ I couldn't prove it and this is what this question is about. How can I prove this fact? And can we give a more general statement? I believe we can. I'll give one more definition first.
For two $\mathscr J$-classes $J_\phi$ and $J_\psi,$ we say that $J_\phi\leq J_\psi$ iff the two-sided ideal generated by $\phi$ is contained in the two-sided ideal generated by $\psi.$
I think the following might be true. Let $X$ be any set and let $J$ be a $\mathscr J$-class in $\mathscr T_X.$ If either $X$ is infinite or $J\neq J_{\operatorname{id}},$ then for every $\phi\in\mathscr T_X,$ if $J_\phi\leq J,$ then $\phi$ is a composition of transformations in $J.$