Eventually, I got it working, well mostly. All the workarounds led to disappointing results, so I never shared it — and moved on.
Recently, after messing around with Cursor, I decided to revisit this project. Cursor wasn’t perfect, but it got me past some of my most frustrating roadblocks — especially Illustrator scripting.
Glad I finally finished it and got it to a point worth sharing.