Is it possible recreate this stencil effect from a Unity shader in Blender without compositing?

I have a character whose eyes are rendered inside its head mesh to give a more cartoonish look. Right now I can sort of achieve this however it requires flipping the head’s normals and using backface culling, which can lead to the hair clipping through the head in some situations as pictured. I need a way to be able to “stencil” or “clip” the eye mesh to only render inside the head mesh in a way like this video https://youtu.be/uniOEpw88jk?si=Rsw7kQdfBTjTHy9Z

I also do need it to be able to work on any model generally speaking, not just this one, which is another reason I can’t just do the back-face culling method.
I’ve tried searching for ways on how to do this in Blender but my efforts have not been fruitful and have only led me to stencils for texture painting.

Welcome :tada:

This might be interesting:

Especially this image and decription… (?)

Comparison of the pure 3D approach that relies on the actual 3D geometry and light sources (left) and the faked 2D look with layers of lighting elements in the shader (right).

Edit: thinking a bit more about it…

You may have to elaborate this to get a more suited answer, because it seems the eyes aren’t really 3D–objects but more flat… so why not just shringwrap them onto the head with some offset and maybe some subdivision ??