That would happen around once a year when I used the 2013 AirPort Time Capsule.
It seemed to stop killing itself when I moved to a ZFS backed samba share.
Funnily enough I also kept snapshots enabled because I was expecting TM to bork itself eventually, so I could always rollback to a working state but I don’t remember needing to use that.
Eh, mine was always on zfs first on FreeNAS then Ubuntu and it didn't seem to help.
The only thing that definitely made it worse was smb over openvpn. It'd corrupt itself every couple months instead of once or twice a year.