In the alpha of your thickness control you can put a scene depth to control the thickness according to the distance from camera. Depending on what you are doing before or not, you have to mask the scene depth. Put the Scenedepth directly to post process emission to see it, then control the parameters for your specific scene.
In this case there is a log there to improve the separation between planes (if the distance is too big) and a invlerp to make it thinner in the right direction. The worldposition+texture makes the line not so straight.