So, I finished testing the hardware and found out that it's not the components, but the unraid itself. Another RAM with ECC did not help. I tried OMV/TrueNas/WinServer2022 systems and on all systems there was no file corruption, moreover even the smb transfer rate on all above systems increased (150-190 MB/s), on unraid it was around 40-50 MB/s. Maybe there is some incompatibility with unraid, but I remember exactly that on version 6.11.... files were fine. I then completely reinstalled unraid with partition cleanup on the flash drive, didn't install any plugins/containers, just created shared folders on the drives, shared via smb, and a day later the files were corrupted again. I now have OMV installed, also running via the same flash drive and the files are fine. Looks like I'll have to wait for newer versions of unraid with a fixed bug to ever get back to it.