$\newcommand{\om}{\omega} \newcommand{\Om}{\Omega} \newcommand{\eq}{\,\overset\om\sim\,} \newcommand{\eqq}{\overset{\,\colon\om}\sim\,} \renewcommand{\eq}{\,\sim_\om\,} \newcommand{\K}{\mathcal K} $ If $E$ is a distributive lattice with measurable binary operations $E\times E\ni(x,y)\mapsto x\wedge y\in E$ and $E\times E\ni(x,y)\mapsto x\vee y\in E$, then the "order statistics'' $X_{n:j}$ can be defined by the formula \begin{equation}\label{eq:wedge-vee} X_{n:j}(\om):=\bigwedge\Big\{\bigvee_{i\in J}X_i(\om)\colon J\in\binom{[n]}j\Big\} =\bigvee\Big\{\bigwedge_{i\in J}X_i(\om)\colon J\in\binom{[n]}{n+1-j}\Big\} \end{equation} for $j\in[n]:=\{1,\dots,n\}$ and $\om\in\Om$, with $\binom{[n]}j$ denoting the set of all subsets $J$ of the set $[n]$ such that the cardinality of $J$ is $j$; cf. formulas (1.2)--(1.4).
As explained in that paper in the paragraph right after (1.4), if $E$ is not a distributive lattice, then the two dual to each other natural expressions for $X_{n:j}$ in the above display may differ from each other, and thus no reasonable definition of $X_{n:j}$ will seem possible.
I did not define a permulation $\pi$ in the above answer, which was given for your initial post with only a partial order, and in that general case such a permutation will not exist in general. However, after you added the total order assumption, a measurable random permutation $\pi$ that you want does exist and can be formally described as follows.
For each $\om\in\Om$, define the equivalence relations $\eq$ over the set $[n]$ by the formula
\begin{equation}
k\eq l\iff X_{n:k}(\om)=X_{n:l}(\om)
\end{equation}
for $k,l$ in $[n]$.
Let then $\K(\om)$ be the set of all $\eq$-equivalence classes. For each $\om\in\Om$ and each $K\in\K(\om)$, let
\begin{equation}
I_K(\om):=\{i\in[n]\colon X_i(\om)=X_{n:k}(\om)\ \forall k\in K\}
=\{i\in[n]\colon\exists k\in K\ X_i(\om)=X_{n:k}(\om)\},
\end{equation}
so that the cardinality of the set $I_K(\om)$ equals that of $K$,
and then define the bijection $\rho_K(\om)\colon K\to I_K(\om)$ by the formula
\begin{equation}
K\ni k\mapsto\rho_K(\om)(k)
:=\bigwedge\Big\{\bigvee_{i\in J}i\colon J\in\binom{I_K(\om)}{k-m_K+1}\Big\}\in I_K(\om),
\end{equation}
where $m_K:=\min K$.
Finally, let
\begin{equation}
\pi(\om)(k):=\rho_K(\om)(k)\quad\text{if}\quad k\in K\in\K(\om).
\end{equation}
Then $\pi\colon\Om\to S_n$ (where $S_n$ is the set of all permutations of the set $[n]$) is a random permutation, which is measurable, because it is defined by composing the measurable random maps $X_{n:k}$ and $X_i$ with other measurable maps. We also have
\begin{equation}
X_{n:k}(\om)=X_{\pi(\om)(k)}(\om)
\end{equation}
for all $k\in[n]$ and all $\om\in\Om$.
Finally, for all $j,k$ in $[n]$ and all $\om\in\Om$ we have the implication
\begin{equation}
(X_{n:j}(\om)=X_{n:k}(\om)\ \&\ j<k)\implies\pi(\om)(j)<\pi(\om)(k),
\end{equation}
as desired.
To illustrate the above description/construction of $\pi$, suppose that $n=6$ and $\om\in\Om$ is such that \begin{equation} (X_i(\om))_1^6=baacba:=(b,a,a,c,b,a) \end{equation} for some $a,b,c$ in $E$ such that $a<b<c$. Then \begin{equation} (X_{n:k}(\om))_1^6=aaabbc, \end{equation} \begin{equation} \K(\om)=\{\{1,2,3\},\{4,5\},\{6\}\}, \end{equation} \begin{equation} I_{\{1,2,3\}}(\om)=\{2,3,6\},\ I_{\{4,5\}}(\om)=\{1,5\},\ I_{\{6\}}(\om)=\{4\},\ \end{equation} $\rho_{\{1,2,3\}}(\om)=(236)$ (meaning \begin{equation} \rho_{\{1,2,3\}}(\om)(1)=2, \rho_{\{1,2,3\}}(\om)(2)=3, \rho_{\{1,2,3\}}(\om)(3)=6), \end{equation} \begin{equation} \rho_{\{4,5\}}(\om)=(15),\quad \rho_{\{6\}}(\om)=(4), \end{equation} and \begin{equation} \pi(\om)=(236154), \end{equation} meaning \begin{equation} (\pi(\om)(1),\dots,\pi(\om)(6))=(2,3,6,1,5,4). \end{equation}