Edge line effect on some scene objects

I have a post process for outline and inner-edge lines on scene objects, but it is not selective and will apply to whole scene.
What I want to do is only apply this ‘edge-line’ effect to some objects in the scene.
This is tricky - if I use a layer-based volume on the scene with the outline effect then it gets badly cropped around object edges - any edge-line that extends beyond the object in the effect gets cropped.

For some scenes it is also possible to have a 3 camera stack with back camera, outlined items and foreground camera but this may be costly.

Can I use a stencil to record which objects must be outlined and then do a clever post process that applys edge-lines to only relevant parts of screen?