Render only shadow catcher not objects in collection

It’s easy to just uncheck camera in the object properties if you just want to render the shadow from the shadow catcher, but if you have a collection with several other collections with objects, What to do? It takes to much time to uncheck each objects camera. And to just uncheck camera icon in the outliner then there is no shadow at all.

Is there a way to hide all objects in a collection with sub collections all objects from render and just render the shadow catcher from all these collections and objects?