Matthias…
I’m actually doing a similar thing right now (and am about to post a slightly different question) but I’m using an adjustment layer (called “EXPRESSION_DRIVER”) in my main comp (called “TOP_COMP”) which has an ‘effect control/effects checkbox’ within it.
In my sub-comps I’m putting the opacity to have this expression…
n =comp("TOP_COMP").layer("EXPRESSION_DRIVER").effect("TURN_LAYER_SET_A_ON")("Checkbox");
if (n==1) {100} else {0}
meaning when the checkbox “TURN_LAYER_SET_A_ON” in my TOP_COMP is ticked then all layers with that expression are on (100% opacity) if it’s unticked then it’s off (0% opacity) which means I can have easier control from the main comp to turn various layers on and off. ‘All’ you have to do is select the opacity from the sub-comp layer and copy it to all the animation layers that you want to turn off at that point and then set up different checkboxes to turn on and off the ones you want. If you want different sets then create a new checkbox expression with a different name (“TURN_LAYER_SET_B_ON” for instance).
I suspect I might be getting your question wrong and also doing this the long way round too!!!
http://www.jimlefevre.com