Even if you ran a basic sqlite nexcloud, if properly optimized, you can deal with millions of files like its nothing. And that is the issue, the bugs and lacking optimization…
4650g + 64GB ram + Mysql and it was file locking on just a 21k 10GB folder constantly.
I have written apps (in Go) that do similar and process data 100 times faster then nextcloud. Hell, my scrapers are faster then nextcloud in a local netwerk, and that is dealing with external data, over the internet.
Its BADLY designed software that puts the blame on the consumer to get bigger and better hardware, for what is essentially, early 2000 functionality.
Database and Nextcloud where on a 4TB NVME drive … in Mysql with plenty of cache/memory assigned to it. Not my first rodeo, …