Your script looks like it will work well. Some methods in Automations are limited, where you’ll have to setup a batching mechanism to update 1000’s of records (which I’ve only ever needed in testing, never production). But simply finding and returning records isn’t limited as such. Any limits are typically mentioned in the support doco.
With one 30 second automation script, you can find and return many, almost countless records - but I’m found you can only update ~6,000 records before the 30 second limit times-out.