Exclude Empty Child Categories in Menu

I would go about this slightly differently. Still using the wp_get_nav_menu_items filter, but first I’ll build an array containing the IDs of all empty terms. Then I’ll compare each of the $items to this for potential exclusion:

add_filter( 'wp_get_nav_menu_items', 'wpse177082', 10, 3 );
function wpse177082 ( $items, $menu, $args ) {
        global $wpdb;
        $empty = $wpdb->get_col( "SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE count = 0" );
        foreach ( $items as $key => $item ) {
                if ( ( 'taxonomy' == $item->type ) && ( in_array( $item->object_id, $empty ) ) ) {
                        unset( $items[$key] );
                }
        }
        return $items;
}

You could of course further restrict this to only affecting WooCommerce Product Categories if needed.