Suppose we are interested in two consecutive transport plans (in the Kantorovich formulation). That is, we are given finite sets $X$, $Y$ and $Z$, endowed with probability measures $\mu_X$, $\mu_Y$ and $\mu_Z$ and cost functions $c_1:X\times Y\to[0,\infty)$ and $c_2:Y\times Z\to [0,\infty)$. The transport problems are to minimize $\sum_{x,y} c_1(x,y)\pi_1(x,y)$ and $\sum_{y,z} c_2(y,z)\pi_2(y,z)$ over couplings $\pi_1$ and $\pi_2$ respectively.
Now suppose we introduce a cost function $c_3:X\times Z\to[0,\infty)$, which maybe satisfies something like $c_3(x,z)\leq \min_y c_1(x,y)+c_2(y,z)$, which is a sort of triangle inequality. Given this, we could greedily solve the first two transport problems separately and then compose the plans, but I suspect this not optimal. My question is how the third optimal transport problem is related to the first two, and perhaps further, how the relationship depends on the level of control of $c_3$ in terms of $c_1$ and $c_2$. I am a novice in the area, so any buzzwords that could point me in the right direction would be helpful.