Well, after some testing, I'm surprised about the solution that is working to me: if you have a Synology NAS, Synology Drive works perfect with millions of files and on-demand files. No issues opening cloud-only files, no issues copying, moving, deleting, adding (and it is fast adding files and giving priority to just-modified files).
The only handicap is you must have a Synology NAS with enough memory to handle your amount of files, and normally a cache SSD disk. My current NAS is a DS1019+ with 8GB of RAM and 1TB of SSD cache and I have about 1 million shared files, apart of some millions not shared.