Get Custom Depth Between Two Intersecting Meshes (Post Processing)

@Deathrey so I followed your advice and I think ive done it correctly? However the issue here is now the outline information is opaque. If I can somehow write to an invisible channel so that this outline mesh is then not visible in render, but used for a post process sobel operation, that would be perfect!
however cant find a way to do this…