how to get jetpack’s infinite scroll to work with woocommerce?

The problem lies in the 'container' => 'content'.

The container parameter is the core of adding infinite scroll to your theme: it specifies the ID of the HTML element to which infinite scroll should add additional posts to.

You need to add ID ( for example: product-wrapper ) to products wrapping element which is going to be new value for container parameter.

'container' => 'product-wrapper'

This wrapping element is <ul class="products">, which is found in woocommerce/templates/loop/loop-start.php file. So just add ID to it <ul id="product-wrapper" class="products">.

This means that you need to edit this file. Best practice for this is to add woocommerce folder to root of your theme, and take what ever file you need to edit from woocommerce/templates folder.
This method overwrites woocommerce default file.

Be careful to follow file path exactly like in woocommerce/templates, in your case it’s going to be woocommerce/loop/loop-start.php inside your theme root folder.
The path is basically the same except for exclusion of templates in your theme path.

This method protects the file from being overwritten by woocommerce update, and you have overview of files that you edited inside woocommerce.

So your function should look like this:

function mytheme_infinite_scroll_init() {
    add_theme_support( 'infinite-scroll', array(
        'container' => 'product-wrapper',
        'render'    => 'mytheme_infinite_scroll_render',
        'footer'    => 'wrapper',
    ) );
}

This part you got right: wc_get_template_part( 'content', 'product' ); that will get you list of products from products loop.

There’s a detailed explanation about every parameter of Infinite Scroll here: https://jetpack.com/support/infinite-scroll/

Hope this helps