I previously shared a jQuery snippet that enforces parent checkboxes to be checked when a child is checked and children to be unchecked if the parent is unchecked.
This works really great in theory, except that WordPress, by default, moves all checked checkboxes to the top of the category list,