Two reasons why I didn’t implement detection for sub-collections:
- If the parent collection is hidden, View Layer, 3D Viewport or Render wise, its sub collections are automatically hidden. So there’s no need to hide them.
- To get sub-collections, you need to implement a rather complex loop cycle to continuously check for sub-collections and their sub-collections (etc) until no more are detected.
What you want can be done. But not only is it overly complex (to my knowledge), it’s also not good for performance (the continuous loop).