@krejci You are going to have a difficult time finding a server that meets your requirements, especially with a 31cm depth. Maybe a 37cm depth, but 31 will be really difficult unless you have a custom system. One issue is that 31cm is close to the ATX style motherboard in size. Also to get >10TiB drives you need 3.5" drives since 2.5" drives are not at the 10TiB capacity yet.
I did find this chassis with a 40cm depth, but it is a build your own server. Its not an already complete server, just the chassis: https://www.newegg.com/p/N82E16811219052
In theory you should be able to get FOG running on a synology nas since the nas OS (DSM) is based on linux. I have not tried to do this, but DSM has most of the components needed. You may need to add additional RAM to the rackstation to support both DSM and FOG. Again, I can’t say for 100% sure it will work, only it should work with some hard work. I can say I have turned a synology nas into a FOG Storage Node (not the main server) before, and it works. I have a tutorial here: https://forums.fogproject.org/topic/9430/synology-nas-as-fog-storage-node