I strongly agree with bendingrodriguez here. As they have said, the solution that's going to work best for you, if it's at all possible for you to use it, is SSH key-based authentication.
The idea behind this is that the connecting account's public key on the client is added to a list of authorized keys which are allowed to connect to the destination account on the server. Once that is in place, any attempts by the client to connect to the server as that specific user, using that specific key, no longer require a password, with the key exchange functioning as an authentication mechanism.
So whilst you can write an expect script to do this, or find various other creative and harder-to-maintain ways to resolve this issue, if you want things to work as easily and reliably as possible, without the headache of having to maintain an ever-growing contraption of your own construction to keep the connection working in the future, then SSH keys are 100% the best way to go here.
Yes, it's always best to set up password-less SSH using private/public key pairs when you have a "relationship" between the SSH client and the SSHD host.
On top of that, I would recomend to use different keys for different purposes.
Be aware that you can name them upon creation, so they do not overwrite the default file.