(Tim Starling ts4294967296@hotmail.com): I'm not sure if this is the right place to ask, but I've just written a bot, and Wikipedia policy says it should be approved before I set it loose.
Looks like you've done you're homework. To run the bot the first time, I'd set the delay to something nice and long like 30 seconds, and run it at some off-peak hour, and go to RecentChanges and check its work while it runs.
But if this is something that will need to be done a lot, then we probably should look at doing it directly to the backend database, because that will use less server bandwidth and not clutter up the recent changes and the article histories.
And yes, I'd like to see the code before you unleash it.