The tracker doesn't seem to be able to understand that I want it to lock itself to the edge of the footage.
Nor should it, because it strictly operates on the footage and doesn't care about comp edges or whatever. That being the case, you have to cheat by pre-composing your work to a bigger comp in which a contrasting solid is beneath your other footage so there is an visible edge. Then the pre-comp can be used as a layer and tracked. When done right, you should be able to use copy&paste of keyframes to obtain your positions and use it on a plain version of the layer. Otherwise you can of course always "crop" back by pre-composing again to a properly sized comp.
The most efficient procedure depends on the shot. Sometimes I stabilize motion with scale and rotation then fix my shot, then put the motion back in to the shot and add it to the repair layer. Sometimes I track in Mocha and do the repair that way. Sometimes I just motion track one end of something like a wire, attach that track to a null, then attach the first wire removal point to the null, add another null for the other end of the wire and then set a few keyframes for the other end. In many shots you would be surprised how few keyframes you can get away with, even with hand held cameras. To offer my opinion on the best solution I'd need to see the shot or at least some video of the corner of the shot where the wire is giving you problems.
Thanks very much for that.
It pretty much confirms what I thought, but I guess I was hoping for a "checkbox" solution. Precomposition it is!