Hi
Thank you very much for this helpful solution that I'll test quickly.
As you probably know, there is a Sigil plugin named "
FootnoteLinker" which creates (or recreates) the missing links in some few seconds using a semantically named single folder for definitions.
This function should handily complement this above plugin.