I have found the Joplin Batch very useful for making global replacements.
Make a backup first if you attempt it, personally I've found it to work reliably and very well. For this kind of thing where manually editing is not viable it can be a lifesaver.