IMO it might be more ideal to do the updates from the tap side, similar to how upstream does it. This workflow[1] allows you handle updates even for formulae/casks you do not own. Using the `brew bump` command, you scan all formulae/casks and create PRs that update them. In these PRs[2], you can use the `brew test-bot` command to ensure the updates are tested working.
[1]: https://github.com/loozhengyuan/homebrew-tap/blob/main/.gith...
[2]: https://github.com/loozhengyuan/homebrew-tap/pull/11