There are quite a few results for add trailing slash .htaccess on Google, but all examples I found require the use of your domain name, as in this example:
R
You don’t need to specify the domain, you can simply use an absolute URL path:
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*[^/])$ /$1/ [L,R=301]
That does also make a check for the URL scheme obsolete.