I think idea with AppleScript will work best
There is AppleScript Guide like this for Glyph?
Or how to make Action like this?
1. Copy vector in Glyphs from Layer 1
2. Paste it into Illustrator
3. Run action
4. Paste vector back from Illustrator to Glyphs in Layer 2