I can't help you much (haven't touched JS for many years) but share a trick I use in C/C++ I routinely use for qsort()
.
JS' sort() allows to specify a compare function. Create second array of the same length and fill it with increasing numbers from 0. This are indexes into the original array. We are going to sort the second array. Make a custom compare function. It will get the two elements from the second array: use them as indexes into the original arrays and compare the elements. If elements happen to be equal, then compare their indexes to make the order stable. After the sort(), the second array would contain indexes which you can use to access the elements of original array in stable sorted order.
In general, stable sort algorithms are only maturing and still require more extra memory compared to the good ol' qsort. I guess that's why very few specs mandate stable sort.