From your example's "music" variable, I would derive two simple
versions, musicA and musicIII, each for one rhythm. The words
would contain no specific indications, but set with NullVoice
to the appropriate music.
Of course, you can break up the music into several variables
from which you assemble the different versions, in order to
localise the variation and make it easier to maintain.
Maybe if we could separate durations and pitch or durations and syllables in different variables this would be much simpler. I've been missing this feature in Lilypond for many years. If you know a way of doing this please let me know. Or maybe I will have some time to implement this now that I'm stuck inside like everyone due to the pandemia.
Caio