If anyone is still looking into this topic,
I have implemented this simple post process effect which only uses the “Render custom depth pass”. The material is lightweight. I have explained how it works in this tutorial.
Unreal Engine 5 - Outline Effect
Hope someone will find this useful