We need a different approach for maintaining and specifying sort order.
It could be moved to separate extension, which is sort of WMF specific, and store the few default orders in a system message and have a place where wikis can define a custom order.
There is a patch to handle some aspects of sorting in core, and should revisit that also.
https://gerrit.wikimedia.org/r/#/c/24211/
Sorting the links really is *not* wikibase specific and the sort orders do not belong there.