How do I allow XLSForm changes after adding custom XML?

Hi,

I have been creating my form using Excel and XLSForm, but am approaching
the point where I want to start adding custom XML.

From this page (https://opendatakit.org/help/form-design/) :
"Our experience is that these form design tools can provide a good starting
point, but, to enable advanced features, you will inevitably need to edit
the resulting form. After hand-editing, you should verify the syntax of the
form using ODK Validate."

My problem is this - after manually editing the form to add custom XML I
need to make all further changes and additions manually in XML. Going back
and adding further questions to my form in Excel and then re-generating the
.xml form will lose the code I added manually.

One solution may be to create patches with python or some other scripting
language for adding my custom XML. Then I can add new fields in Excel and
just run the patches on the new .xml form. This does however seem a bit
tedious and has lots of scope for bugs to creep in.

Does anyone have a better approach for me?

Thanks,
Andrew