A slight modification to what you suggest:
First go along both the red and green lines and check for any intersection with either another segment in the green line, or another segment in the red line. Add points at all those intersections. Any such points that are within the circles will get deleted at the next step anyway, but those that are not will accurately define sharp corners.