Oh found this addon after another browse through
https://www.wowinterface.com/downloa...entFilter.html
There is a sort option on there that includes ID .. but depending on whether it is reverse or forward would be whether it does what you want or not.
If not, hopefully you will be able to decipher how they do it to use it in your own addon if what they have is not what you want.