Isolate drawings based on z values

Hey! Is it possible to isolate parts of animation based on z-depth? I need to export specific parts of characters and usually I need to slice them in parts that goes over or under of different elements. We have quite complex character rigs and usually I do this by picking each part one by one and create new composition, and then export it. That usually does the trick, but it’s not very elegant solution and takes time to go through each parts. So, I was wondering, if there is better way of doing it?

Usually everything is just passed through to last final composite node, and I was thinking that I could slice that based on the z-positions from there? Like have a node (or node setup) that will isolate drawings based on their z values and passes only those that goes beyond my threshold?

I hope this makes any sense. Also, I just might have missed the solution for this kind of thing, because I’m a bit beginner with Harmony. I’m using Harmony 20 Premium.