Let $X,Y,Z$ be metric spaces. Let $\mu,\nu,\omega$ be the probability measures on $X,Y,Z$, respectively. Moreover, assume all three measures vanish on small sets. Assume $T:X\to Y$ is the optimal transport map from $\mu$ to $\nu$, i.e., $\nu=T\#\mu$; and $S:Y\to Z$ is the optimal transport map from $\nu$ to $\omega$.
I wonder if $T\circ S$ is the optimal transport map from $\mu$ to $\omega$. I know the statement is true when $X=Y=Z=\mathbb{R}$ where the optimal transport map between distributions of two 1-d random variables can be analytically expressed. Moreover, the statement is false if the measures are discrete in $\mathbb{R}^d$ for $d\geq 2$. But, how about the general case? Is there somehow a gluing lemma here?