One sufficient condition comes from stochastic domination.
Suppose the $X_i\in\mathcal X$ are continuously distributed with distributions depending on a parameter $\theta=\theta(X_i)$ so that for $X,Y\in\mathcal X$,
$$\theta(X)\ge\theta(Y)\qquad\Longrightarrow\qquad\Pr(X\ge y)\le\Pr(Y\ge y)\quad\forall y.$$
Then $\theta(X)\ge\theta(Y)$ also implies \begin{align} \Pr(X\ge Y)&=\int_{-\infty}^\infty \int_y^\infty f_X(x)f_Y(y)\,dx\, dy =\int_{-\infty}^\infty \Pr(X\ge y) \,f_Y(y)\, dy\\ &\ge\int_{-\infty}^\infty \Pr(Y\ge y) \,f_Y(y)\, dy=\int_{-\infty}^\infty \int_y^\infty f_Y(x)f_Y(y)\,dx\, dy= \frac12. \end{align} Hence the $X_i$ inherit (a homomorphic image of) the order of the numbers $\theta(X_i)$, and so are totally ordered.