Other ways to detect edges?

Yes

alternatively you could use a dither node and a masked material

It should be cheaper to render.