I’m in the side it’s iCloud problem because I had it some time ago. As with most clouds, when yo go serious with files (more than about 300.000), use to fail.
I had my entire reference library (about 800.000 files, mostly PDF and ePub) in iCloud, distributed in a rational folder hierarchy. For example, my entire Scientific American collection was stored in SciAm folde, inside that folder, in sub-folders of 10 years: 1845-1849, 1850-1869, and inside each folder, the complete ten-year collection, that, for times before 1912, were about 500 files (one for each week of each year), then 120 (one for each month of each year).
Suddenly I noticed some files weren’t there anymore. Sometimes there was one file for folder, sometimes tens of them. Disappeared. Not in iCloud web, not in recovered files, not in other macs. I even tweeted about this when it happened to me.
And at those moments, DT had nothing to do with them, as I’m not sure if I were using it or not, but if I were using it, it was without indexed files because, well, I didn’t knew DT could be used that way.
Then I moved to Dropbox, then I used indexed files in DT, then I gave up with Dropbox due Monterey issues and move into DT local files one more time, and now I’m using Synology Drive client that works better than OneDrive, Dropbox, iCloud Drive or Google Drive, having tested pCloud and other providers.
I never recommend the use of iCloud Drive except for trivial things, not serious work, and even less if that work is critical.
In my experience with indexed files in DT, the only issue is, if indexed files are in a cloud service, the generation of duplicated real files in disk, or phantom ones, so and then. And even in that case, I suspect the guilt is the cloud service that is not able to handle the sync well.