I used to use restic with scripting, then I discovered resticprofile, and swiftly replace all my scripts with it.
https://github.com/creativeprojects/resticprofile
I also use Kopia as an alternative to Restic, in case some critical bugs happen to either one of them.