How to filter children by field, that is set in parent

Yes, you can do that, maybe do it similar to this approach here:

So you would create an array of your groups with a sorting number attached to each item, then sort by this, then group.