What i usually do is to have one multi-purpuse group at the end of each material.
This group can be empty where each material just get piped through, or it can be used to add custom aov passes for all your materials at once, or you can use it for overriding all your materials with a diffuse shader, or you can use it to add fake atmospheric fog to your shaders, …
Im not saying this is the most elegant solution but this worked for me in the past. Just make sure you have your multi-purpuse group attached at the end of each material since the beginning of your project so you dont have to go through all your materials at the end, then its pretty comfortable to use. One could also make a script that makes sure such a group is attached to every material in the scene.
I’d love to have a proper native solution from Blender though