This reminded me of adaptive comparative judgement. I'd be interested in your algorithm on how you decide how to pair up items.
As for the algorithm, it's a basic Quicksort, building on the work of Leonid Shevtsov[0].
[0]: https://leonid.shevtsov.me/post/a-human-driven-sort-algorith...
Quicksort can be great for human-comparison sorting if you let the user pick the pivot, and if you have a direct-manipulation interface for dividing a big pile into two smaller ones. Humans are great a scanning large numbers of objects, and can split piles much faster than operating one by one.