My usual approach with valuable iCloud Drive folders is to have an automatic process rsync them somewhere else and auto-version them there (Git, Dropbox, etc.). This wouldn't be great for very large data, but most of what I care to aggressively version and keep that lives in iCloud Drive is text or otherwise small, for which having two copies is trivial.