Hello capink
I would like to thank you, because thanks to your code I was able to create my plugin
Mass Search/Replace .
It is only designed for Search and Replace operations (and therefore much less complex than yours), but I hope it does it well.
Thank you again, you cleared the way by extracting the Search/Replace module, and without you it wouldn't exist.