Detecting stale locks

The locks left behind by a failed backup run, won’t block other backups from working. That only happens for locks created by check / prune.

which is that a neglected lock prevents backups from happening and a user has to go look for the problem

You really should check the exit code of the backup command (exit code 1 == no backup was created at all) if you care about your backup. There’s not much that can be done about that as lots of possible errors just can’t be resolved automatically by restic.