My immediate instinct was that LUKS could
issue trim/discard.
It looks like there's some anecdotal evidence out there that LUKS can discard
https://superuser.com/questions/124310/does-luks-encryption-...
https://unix.stackexchange.com/questions/341442/luks-discard...
My question is more for the mdraid at the bottom of the stack than anything. I'm also a little curious about performance of something webdav vs. samba vs. sshfs (sshfs usually wins out and webdav does not strike me as particularly efficient)