Highlighting mesh boundary edge

Hi, I am trying to achieve the result

Screenshot 2021-04-21 at 9.21.04 PM

Searching, I closest I have come across is EdgesGeometry which highlights every single edge, but what I am looking for is just the boundary edges.

Please help me out guys

Have you already tried OutlinePass? This approach is based on post-processing and demonstrated by this demo: three.js examples

Cool. That slipped me. Thanks!

That worked but I have gizmos rendered as a portals on top of scene. Adding Postprocessing just messes up the depth. Is there any other way it can be solved?

The extension to this question. This highlight pass is highlighting the object as a whole. What if i want to create animation where a line is traveling around the edges ? How can i do that ?
Shared the example :