Note that there's more in these PDFs than images, so rebuilding new PDFs from the processed image files is not an option.
No, it's not. JS has no access to the image streams in a PDF file. You can, in principle, overlay the old images with the new ones (using button fields to hold the new images), but then the issue is that you can't detect the location of the old images. In short, you need to look for a different solution.
oh heckety heck