First I use VertexSplit to duplicate vertices which have discontinuous UVs.
Next a simple VEXpression in a wrangler sets positions (P attribute) from UVs, essentially flattening the mesh onto the XY plane.
I feed that mesh into a Polydoctor which has its Pair Overlaps flag enabled. That way the PolyDoctor creates a “valid_poly” attribute and places a 0 on ones which overlap.
In another wrangler, taking both original and flattened geo streams as inputs, I mark the invalid polygons on the original mesh. (The poly order remained the same so the wrangler can just run over primitives.)
I let an Unwrap node do its magic on prims which are marked as invalid then as the final step an UVLayout tidies up.
I hope it makes sense.

Good luck!