I have spent a lot of time today tinkering with #lilypond file structure and have reached the conclusion that it's probably not worth pursuing the half-built pre-processor thing I wrote last year; better to invest the time writing a template/wizard specific to my purposes.
Half my problem was being lazy and relying on Frescobaldi's built-in wizard, which is good but opinionated.
(I'm still thinking about automated workflows; do a git PR for a finished #lilypond score and automagically publish PDFs, preview images, MIDI/MP3 files, etc)