Woocommerce Remove Tax by Product Type

After many headaches and trials and errors, instead of trying to recalculate the taxes, I just altered the taxes.

I changed my foreach loop in the second function to the following:

if('metal'===get_post_meta($item['product_id'], '_product_type', 1)):               
    $cart->taxes[1] -= $item['line_tax'];
    $cart->tax_total -= $item['line_tax'];
    $item['line_tax'] = 0;
    $item['line_subtotal_tax'] = 0;
    $item['line_tax_data'] = [];
    $cart->cart_contents[$key] = $item;
endif; 

Now it works like I need it too. Yippee!!!