Super glad to see this conversation happening! David I'm so glad you've been working on the backend for divisi. Divisi staves have long been my biggest headache.
Thomas, thanks for writing the improved version. I haven't had a chance to look at the code deeply yet — I will play around with it this weekend.
One observation about the user interface: logically, if the combined 1+2 staff is hidden, both the staff for 1 and the staff for 2 should be printed. IMO one of the design goals for a divisi user interface should be to manage this automatically without the need to write separate simultaneous commands to hide or unhide each staff. There are only two possible states for a two-part divisi: combined or separate staves. Only a single command should be needed to toggle that state. Extrapolate for 3, 4 way divisi etc.
As an aside, for what it's worth, from my perspective as a composer who uses a lot of divisi staves, I want to minimize separation of divisi commands from musical content, because the choice to divide or not depends on the musical content, which I may revise frequently. I recognize that many other Lilypond users prefer the style you used in your example, but I just thought I'd mention it, since if this is moving towards an officially supported interface, IMO it needs to support both styles.
Saul