Would we really have to cheat and manipulate filenames? How about we let Duplicati generate filenames like it always does, but then run the name through a hash function. Take the the last 2 or 3 characters (depending on how many folders you want to end up with) to determine where the file should be placed on the back end.
echo 'duplicati-b04f7ec9562cb47ba9e992c87e90b5da3.dblock.zip.aes' | sha256sum 92bf201ff334a1fac711fcc6f102a4c4dc888da2b7c78c6c3c81b1579533adf3
this file could be placed in /f/3
echo 'duplicati-b4cbd825ee4454ec88f068d4ab88ec7b8.dblock.zip.aes' | sha256sum dcd7b14a006735546fb0f47551691be1f8d559cbd27fd74e09aa402eea459228
And this file would be placed in /2/8
Nature of hashing functions is that the distribution should be even. The files would end up be splitting into 16 ^ X folders, where X is the number of characters you pull off the end of the hash.
Two characters = 256 folders
Three characters = 4096 folders
Edit - well maybe if they are completely random already it’s unnecessary to run them through a hash function. Just use the last 2 or 3 chars of the original filename lol - before the .dblock.zip.aes of course.
Edit2 - perhaps it would still be useful for dlist files which do not have random names.