That’s similar to some fun I had when looking into automatically registering decrypted values as secrets in community.sops. In the end I decided to not automatically register decrypted values as secrets, but allow users to request community.sops to do that if they want.
You might also be interested in this discussion: How to register secrets - as plugin developers, and users?