Connecting to a different database

But I would like to use my secondary database connection like a
standard WordPress query, so that all of the query builder functions
are available.

Unless the other database is a WordPress database, with the exact same table structure, you can’t.

The query builder functions in WordPress are designed and built only to work with WordPress’ tables. Their internal logic all depends on the specific database structure of the tables that they query. WP_Query, for example, is designed only to query the wp_posts table, and it also depends on other classes that are designed to work the wp_postmeta table, wp_term_relationships table etc.

So not only would those classes and functions not work with your custom tables, they wouldn’t even be useful, because they’re so tightly coupled to those tables. Being able to query based on post meta, or post status isn’t useful if your data isn’t post meta or doesn’t have a post status.

When dealing with custom tables you will need to build any functions or classes for querying them yourself. If the database is MySQL, then a wpdb() instance will give you access to helper methods like prepare(), insert(), get_results() etc., but that’s as much help as WordPress is going to give you.