This is really neat. Recently I explored similar functionality for relational databases and only got as far as implementing column-level encryption [0] in this Go library [1], but without support for querying the encrypted data. HashiCorp Vault's transit secrets engine supports Convergent Encryption [2] which provides limited ability to query the encrypted data, but I haven't yet experimented with it. If anyone is doing something like this in production, would love to hear about your experience.
Index funds will almost always outperform actively managed funds. They are the best choice for the layman investor. An excellent book on this topic is The Little Book of Common Sense Investing by John Bogle.