global $product is empty string when passed into function

I think the main issue here is that the calling context of hooks (eg. targets of add_action) are not the same as the functions.php inline code. Also, function parameters come from the calling context, not just because there is a variable of that name in the same file.

This “function enqueue_product_modals($product) ” will not work.

As for use of Woo globals, I believe all of them are deprecated.
Here is how global $product gets set:

includes/wc-template-functions.php:140: unset( $GLOBALS['product'] );
includes/wc-template-functions.php:150: $GLOBALS['product'] = wc_get_product( $post );
includes/wc-template-functions.php:152: return $GLOBALS['product'];

So, you can see the “going forward” way to get the WC_Product object for a given post.