When receiving error ‘STC failure occurred mid transfer. – Final error (-31 A device attached to the system is not functioning.)’. this normally means that one of the drives of the server is not performing properly and might have bad sectors. Since the Datto does a volume backup, if the drive is starting to failed, is not going to be able complete a backup for the machine.
We would recommend you to check that the hardware on the server by running the command chkdsk /f /r on the command prompt of the server. This would require you to schedule a reboot of the machine so the task can run. Also, please run an sfc /scannow and then a disk defragmentation.