s_MathOpsComp as a replacement for SetMatte

I think we all know how infuriating it is that SetMatte in After Effects doesn’t work very well with anything but shape layers. We often have loads of precomps and duplicated track mattes as a workaround. I ran across this guy’s solution the other day.

It got me thinking, is there a way to use s_MathOpsComp and/or s_Effect to accomplish the same thing?