Filter WooCommerce archive pages by an additional category

you need to add your topic to query_vars.

function so306156_add_query_vars_filter($vars)
{
    $vars[] = "topic";
    return $vars;
}
add_filter('query_vars', 'so306156_add_query_vars_filter');

and then, in pre_get_posts, you check for that var and act accordingly:

function so306156_manipulate_main_query($wp_query)
{
    if (function_exists('is_woocommerce') && !is_admin()) :
        if ($wp_query->is_main_query() && is_woocommerce()) {
            if (isset($wp_query->query_vars['topic'])) {
                $tax_query = $query->get('tax_query');
                $tax_query[] = [
                    'taxonomy' => 'topic',
                    'field' => 'slug',
                    'terms' => $wp_query->query_vars['topic'],
                    'include_children' => true, //true is default so you could leave that one out..
                    'operator' => 'IN' //also default
               ];
            }
        }
    }
}
add_action('pre_get_posts', 'so306156_manipulate_main_query');

im not super sure about the $wp_query->query_vars['topic'] thing in terms, try to echo that one out in the function aka echo <pre>, print_r( $wp_query->query_vars['topic'] ), '</pre>';

and now, i was thinking about another issue..
you created that custom taxonomy topic you are talking about, correct?? because you do not mention that part in your question. in your question you say, that topic is a sub-category of some sort..=?!$%/$%/(???? subcategory of product_cat?? than this stuff above won’t work =)