At one point (long ago) Sigil didn't default to the top of the file (ToC generation). Then I remember a discussion taking place, and the behavior being changed to what it is now. I don't remember the driving force behind the change.
I admit I'm having difficulty understanding GrannyGrump's workflow, and how Sigil's default behavior is hampering it. I understand the need to be able to copy/paste urls
en masse. I'm just not quite understanding how the undefined fragment errors might be introduced when doing so. Sigil's TOC generation routines don't remove any IDs, so with or without an url fragment, the target should still exist.
Is it possible the "undefined url fragment" errors are completely unrelated to the task at hand?
There are avoidable conditions where splitting/merging with Sigil will create broken urls that will produce such an error when validating. I know because I recently modified Sigil to warn a user that those conditions are present before performing the split/merge.
Perhaps a small, step-by-step example of the workflow involved (with a sample epub) would help us understand better?