For reference here's how I did it, it relies on keyboard shortcuts and trying to minimise mouse movement.
Get the prefix string [LEL17] or [HAMR] in the copy/paste buffer.
Open the specific forum index in a new browser window (I'm using Firefox).
1. Middle click on each thread to open the thread in a new browser tab (but focus stays on the current tab - the index).
2. Go back to the first new window (Ctrl+Tab then Ctrl+Tab will do it).
3. Click on 'modify', press Ctrl+Tab to move to the next tab, repeat for all tabs until you get back to the index. (You can't hold down Ctrl whilst clicking as it will open the modify page in a new tab.) The modify button is generally in the same place on each tab, so there's no need to move the mouse that often (threads with no replies and locked threads are the exception).
4. Once you're back to the index, go forward to the first new tab.
5. Position the mouse pointer at the start of the Subject text box (it'll be in the same place each time except for locked threads)
6. Hold down Ctrl for the whole of this step, left click at the start of the Subject text box, hit v (so you're doing Ctrl+V to paste in the prefix), then hit tab (i.e. Ctrl+Tab) to move to the next tab, click mouse at start of Subject text box, v, tab, repeat for all the tabs, now you can let go of Ctrl.
7. Back to the first one, move the mouse pointer down to the save button on the right hand side in the bottom half of the window.
8. Hold down Ctrl (again for the whole of this step), click save, press tab to move to next browser tab, click save, tab, click save, tab, etc... until you're back to the start. The save button doesn't move that much (only for bigger posts or locked topics). Now release Ctrl.
9. Now close all of the new browser tabs (leave the index tab there) once they have finished reloading, the title of each new browser tab should contain the prefix so it's easy to check if you've missed any.
Then repeat the above for all of the remaining index pages.
As a final check sort all of the threads by Subject and check the first/last pages to ensure that every thread contains the prefix.
Then you've got to create the index page. For this I used wget to grab the HTML for each of the index pages, e.g.
wget https://yacf.co.uk/forum/index.php?board=80.0
wget https://yacf.co.uk/forum/index.php?board=80.50
wget https://yacf.co.uk/forum/index.php?board=80.100
...
wget https://yacf.co.uk/forum/index.php?board=80.500
Then it's a case of a big command line to pull out all of the subject lines (which should be the only lines that contain the prefix) and strip out the HTML and make it into BB code for the index thread:-
grep "\[HAMR\]" index.php\?board\=80.0 index.php\?board\=80.50 index.php\?board\=80.100 index.php\?board\=80.150 index.php\?board\=80.200 index.php\?board\=80.250 index.php\?board\=80.300 index.php\?board\=80.350 index.php\?board\=80.400 index.php\?board\=80.450 index.php\?board\=80.500 | sed -e 's/.*href="//' -e 's/PHPSESSID.*amp;topic=/topic=/' -e 's/<\/a><\/span>.*//' -e 's/">\[/ /' -e 's/HAMR] //' -e 's/^/[url=/' -e 's/ /]/' -e 's/$/[\/url]/'
Worth sticking this through "wc -l" to check that it matches the number of threads in the forum.
Paste this output into a new thread (you may need to split it into multiple posts if it's bigger than 30,000 characters.
Mark the top n messages as "Sticky: " as required, then modify those individual threads to remove the sticky option in "Additional Options" so that they aren't sticky when they get moved into the parent forum.