Material working as negative matte affecting alpha

Hello, trying to figure out how to make a material that works like Maya’s black hole or a material that will erase itself and remove any part of the objects behind it, affecting the final rended alpha.

Dont know if I explained it well enough, a material that will set matte -1 and cut out objects behind it in the alpha channel. Like in the picture below:

Would be great to have!