You don't need a moveURL 'intermediate' at all.
The problem occurs because you add a new footnote to the found item (curRes) - which you can see if you add this after the footnote.add line:
(then please remove it again, as it's only to show how to check what the problem is).
You can fix this, oddly enough, by adding the footnote before the targeted text:
var curFootnote = curRes.insertionPoints.footnotes.add();
If you check with the 'select' trick, you will see that the found text 'curRes' still only consists of the URL part, and the new footnote appears right before it, and not inside. When adding a note 'at the end', using
var curFootnote = curRes.insertionPoints[-1].footnotes.add();
you will find the note becomes part of 'curRes' and so you cannot move its text anymore into that same note.
With that done, it's a breeze to move the found text into the footnote, but then you still have to remove the URL markers. There are several approaches but I would do that by copying only the relevant text into the note, then removing the entire found text in the document, like this:
curRes.characters.itemByRange(6,curRes.characters.length-5).duplicate(LocationOptions.AFTER, curFootnote.insertionPoints[-1]); curRes.remove();
Wow. That worked perfectly! Thank you so much. And thanks for making that website of yours that has helped me so many times before. You're a great asset to the community. Thank you!