...
If you are using an account that requires a password or private key, these secrets must be kept safe. Use Using a password safe is one good option. Another option is an encrypted, secured document that requires a passcode to open. Make sure the encryption algorithms are using current industry standards. Access to a password safe or encrypted document should be auditable.
Informational Resources
Managed Service Accounts and Group Managed Service Accounts on Windows
...