1st step: Does it happen with other email clients and the same remote server? E.g. do use msmtp, Thunderbird etc against the same server for a while.
Guess: This looks more like the server / the remote end is shutting the TLS connection down. As you know the server and the port, connect with openssl s_client a couple of times (it also supports STARTTLS with EHLO, though you need to get the exact command from the man page openssl-s_client(1)) and speak some SMTP. Perhaps you can reproduce the problem? Guess: Could it be that the remote end drops you when under load? Do you have access to the remote server logs? If not, your service provider might be able to look up potential errors in their log.