If you didn't see @JoeSondow's post a while back on his bots failures, it's a great lesson in splitting up complex operations into idempotent, retriable jobs.
https://www.naildrivin5.com/blog/2023/12/20/picard-sidekiq-tip-split-up-independant-operations.html