If you don’t mind having your hierarchy in alphabetical order, you could go into “edit->preferences->general” and enable “Enable Alphanumeric Sorting”, this will give the hierarchy a little “AZ->” icon that you can press at any time to quickly sort your hierarchy instead of having to manually drag into sorted order.
I’d imagine you could write a script that would automatically check and reorder, or create a custom editor tool that could do it by specific object/specific sort.