Hi!
Using ajax rather than pagination would still avoid timeouts, while still performing it all in one action/run.
Some questions I have:
1) Would the 'product-images' directory contain sub-directories, that would need to be searched through when looking for images matching a product, or it would only contain the image files themselvs?
2) The images in 'product-images' folder would or would not have already been added to wp media library? It they wouldn't have been added prior to running this it would also need to fisrt add them to media library prior to assigning them to the product(for the images found to match a product, of course).
3) The extra images would be added as what? Woocommerce and Wp itself do not natively create galleires for post/products, unless you have some add-on installed.
4) Would all SKUs be assumed of the same size(to avoid running into situation when same image file could match more than just a single product, which could create problems)?
5) Assuming this would always be run manually: SHould it output anything back through the process?
That would probably need a settings page, where the directory to look through can be freely assigned and maybe some settings you may need, as well as a page where this would be actually run from(I am assuming it would always be run manually, not by schedule or anything), although this might be actually done from the settings page itself too.
Kind Regards,
Dobri