Perhaps I don't understand your reasoning but it seems you want some facility to hold the password for your encrypted file in a safe manner i.e. you want to hold your password itself encrypted. And all decryption has to be automated/script-able?
The problem is you will face the same issue of plain-text password security for the password on the encrypted password file when it has to be decrypted. There is no way around this except to control permissions on the password file. Your password will have to be stored in some form in plain-text whether for the password file or for the final file to be decrypted.
One possible compromise might be to do this using a agent program which can store your plain-text password in some obfuscated form in memory eg: ssh-agent or gpg-agent for gpg which is what you might be looking for. However, I believe these might only be usable with Public/Private Key (PPK) type encryption and not symmetric key encryption which is what you have used above (see: link1 and link2)
Also you probably want to use gpg instead openssl for your encryption/decryption needs (See: OpenSSL vs GPG for encrypting off-site backups?)
More information on using openssl/gpg for symmetric key encryption: https://stackoverflow.com/a/31552829/3242988