For SQL Server I would try to switch to using a trusted connection. (IE give the user the app pool is running under just the access needed for the database)
I would look at using Oauth tokens for talking with the SAP cloud
https://www.itsfullofstars.de/2020/05/how-to-obtain-an-oauth-2-0-token-in-sap-cloud-platform/