Hey! I know this is way after the fact, but if you haven’t discovered already, SADLY stencil layers don’t support certain things. In this case lumen’s global illumination making it relatively useless in many cases. It also doesn’t support nanite so if you rendered a stencil layer and it came out blank, it’s likely because the mesh was nanite.
A fun new bug in 5.2.1 is if you have nanite ANYWHERE in your scene, the stencil will render nothing. You have to actually delete the nanite meshes or convert them from nanite in order to get a stencil out of your render. Hope that helps you or anyone else who stumbles across this post.