Skip indexing top level parent terms

<?php

/** indexes only child or deeper level terms **/
add_filter( 'facetwp_index_row', function( $params ) {
    if ( 'product_categories' == $params['facet_name'] ) { //change 'product_categories' to name of your facet
		if ( 1 > $params['depth'] ) { // adjust this for different term levels as needed 
			$params['facet_value'] = ''; // skip indexing
		}
	}
	return $params;
});