Since you're going to write a Python script, I figure I can share what I've done so far on mine.
I made a lot of improvements to my Python script (one of the advantages of being retired) and I thought I'd share it, even if it never gets used. It deals with:
* chords that don't have two notes in them (it leaves them alone)
* adding dotted length and articulations and slurs, etc. to each voice (but stops if there is a space)
* deals with chords that aren't separated by spaces
* automatically changes \relative blocks to absolute
It certainly could be cleaner, but I'll share what I have now: