Loop through all product posts?

Take a look at WordPress codex for WP_Query for more information.

You’ll see there are different parameters for WP_Query, you just need to add the posts_per_page parameter with the value set to -1 to show all posts.

$products_IDs = new WP_Query( array(
        'post_type' => 'product',
        'posts_per_page' => -1,
    ));

while ($products_IDs->have_posts() ) : $products_IDs->the_post();
    // Your code
endwhile;