I think that securing the connection falls outside of Moodles arena for the most part, so there isn't anything particular in Moodle to secure this connection.
I think it would be best to handle this at the networking level and you can quite easily setup a secure tunnel between the two servers to achieve this and Moodle plugins
will work fine with that. For example, a quick and dirty solution would be ssh tunnel between the two servers and connect to that tunnel. However, i'm sure other more robust solutions exist. Hopefully someone will have a good example of doing this in production.