It seems this will only be feasible when we have homorphic encryption ready.
If someone is interested on that kind of encryption, see "A FULLY HOMOMORPHIC ENCRYPTION SCHEME"[1] and "Fully Homomorphic Encryption without Bootstrapping "[2]
I don't care about low-level encryption details. That's why I use encryption software instead of coding my own.
I have thought about doing this also. How about the sync'ing? Does it sync only parts of the container, when you change something or does it have to sync everything, when you make a small change?
KDE plasma has just started incorporating this into their desktop as a product called 'Vaults'.
Containers lime VeraCrypt would be quite inconvenient, but work if you don’t make changes on many computers at the same time.
It's open source.