Transitions between lexicographical orders
Aside from trivial cases, transforming lexicographic order indices from one ordering to another ordering can can rarely be done more efficiently than unranking the index using the original alphabet ordering, and then ranking the resulting sequence using the new alphabet ordering.
That works fine in this case, because after precomputation of a table of size $O(N^2)$ (which doesn't depend on the chosen ordering), you can rank and unrank an element of the lexicographic sequence with an arbitrary lexical ordering in $O(N)$ time. (The naïve proof-of-concept code I wrote does the ranking and unranking in $O(Nk)$ time, where $k$ is the size of the bracketing algorithm. But it should be possible to get rid of the $k$.)
The algorithm can be found in Ranking and unranking of a generalized Dyck language and the application to the generation of random trees, Jens Liebehenschel (1999). Liebehenschel's algorithm uses a fixed ordering but extending it to arbitrary orderings is straight-forward.
Liebehenschel's generalisation of Dyck languages allows the use of an arbitrary many-to-many relation between opening and closing symbols (although it requires that the set of opening symbols and the set of closing symbols not have common elements). Restricting the relationship to an isomorphism doesn't significantly simplify the algorithm.