Deadlocks in Rebuild Smart Group Cache
That pretty much sums it up. We have fixed similar problems by changing the Smart Group cache timeout via civicrm/admin/setting/search?reset=1, alongside setting a limit to the Scheduled Job so that only X groups would be considered for each job run.
In another situation we did the following (pasted from our ticket system).


set cache clearing to deterministic drush cvapi setting.create smart_group_cache_refresh_mode=deterministic
created a scheduled job to run always job.group_cache_flush

Outcome was clearing the civicrm_group_contact_cache after the 5 minute time we allow caches to be valid.
This should resolve deadlocks that occur during cache clearing. It will not resolve deadlocks that may occur during cache rebuilding

Hopefully those give you some ideas of ways to progress