What's the efficient way of remove these closed polycurve segments and keep the curve closed?

I’m thinking:

  1. Dupe segments
  2. Check angle between adjacent ones
  3. Remove if found
  4. Fillet with radius 0 previous with the next segments
  5. Join and replace original curve
  6. Repeat until nothing found anymore

Does it seem sensible?

I guess in addition to or replacement of finding the angle you can check the distance between 2 adjacent segments end and start points.
If end-start distances are below a threshold value you can identify them as being a sliver and cull them.

Yes, that’s exactly what I needed and figured out to do after I posted, no angle measurements needed.