Unpopular opinion: there are no known tax loopholes
The tax code was written to provide an incentive for things the lawmakers want to encourage. This may be cheap gasoline, clean energy, domestically made products, or whatever. Those who are supposedly exploiting loopholes are really just following the rules and doing the very thing that the lawmaker was incentivising.
Now, people may disagree with the lawmaker's intent. But that doesn't make it a loophole.
There could also be poorly written laws that do not incentivise the intent. I'll concede that these are, in fact, loopholes. However, as soon as the word gets out, the lawmakers could update the law to meet their intent. If they do not even try to do so, it's because that was their intent (or it's the intent of the subsequent lawmakers that ousted the original author).