Is there a way to append a trailing slash to get_home_url() and get_permalink( get_option( ‘page_for_posts’ ) )?

You can use the trailingslashit function to make sure your URL’s always have a trailing slash.
https://developer.wordpress.org/reference/functions/trailingslashit/