Doing it by hand is very hard and messy. Is there any way to automate this? If so, how do you do it?
I had a quick go using Outer Glow.
Use the wand to select the left cliff.
Copy then paste, which will lift it to a new layer.
Add a Layer style - Outer Glow with high opacity, zero spread, size as your 'border' thickness, range 1% [& colour bright aqua just to make it very obvious ;) Technique soft or precise ..take your pick, depending on how hard you want the edge to be.
Stroke might also be an option, but you'd have to re-mask your outer edges.