A simple quick-fix will be to have parent categories bring their children with them when they move.
And disable the relevant up/down arrows for subcategories when it is already on top/bottom of the parent.
This way should at least solve the majority of usability prob, except that creating a new subcategory or moving one among parents etc will necessitate reassigning the sort order numbers.