I have not carefully spec into this but a quick search lead me to this: https://eclecticlight.co/cirrus-bailiff/
They somehow managed to DL files on iCloud . (not sure if they used private API)
I do think you could eventually achieve this on iCloud as I say there are many app does this, E.g. Obsidian file management, NSSurge configuration sync (similar situation to Alfred), even if they once could not.
Thanks!