I'm not sure I understand your question/idea. You can embed the private key file but you don't have to. You still can refer to it by pointing to a specific path. In addition, you can place this credential in a separate document with a dedicated password, only known by you and refer to the credential using the name - see also: https://support.royalapplications.com/support/solutions/articles/17000027776-store-connections-centrally-and-share-them-in-a-team
Using the above two techniques, you should be able to cover all scenarios.
if I want to use the private key. It has to be saved in the configuration file but this file can be shared with someone else because other passwords are saved in local configuration (Applications). So you will share the password to your private key.
Please move or create global private key which can be used saved and used from local configuration(Applications) . Similiar to normal credentials.