systemd-path is the cleanest and most portable solution. You define a path service to watch your directory for changes and trigger another service to perform certain actions then. It uses inotify.
https://man.archlinux.org/man/systemd.path.5.en
Here is a full example from our currently so beloved redhat: https://www.redhat.com/sysadmin/introduction-path-units
You mean the step after the ludicrous amount of inpainting one has to do sometimes?
Apart from the mentioned adddetail lora (works in negative prompt as well), maybe rerunning the image through ultimate sd upscaler with the controlnet extension? (go easy on the denoise level here, or your image becomes a surrealist's dream)