would it be a bad idea to have a threshold for the insert inflections? if you draw a just sublty s-curved stem with vertical handles at the extremes, but their OCP only a few units apart, you might not want an inflection, since it would produce a kink in the curve.
this is not a big issue, maybe the skript might be better applied to selected portions of a path instead?
This functionality is already built into Glyphs. Shift-click with the Pen tool (P) close to an inflection. The plugin is intended for automating that functionality.