In New York, a sliced bagel with a smear of butter is a taxable prepared food product. A uncut bagel with a side butter is tax free. Should I be a criminal for going the unsliced route if I wish to deprive the state treasury of $0.10?
If you consider something a loophole, fix it. If the law is so complex that fixing loopholes seems untenable, consider simplifying the law to have fewer special cases.
If a company then tries to avoid paying its share of the infrastructure, the company is breaking the deal. If doing so does not break existing tax law, that does not mean the company is in the right.
All this is of course fuzzy, but when a profitable company pays zero taxes, you can certainly not claim that you believed the amount of taxes you paid seemed reasonable to you. And the company should of course be held accountable for this even if it did not break any specific tax law. Not paying your share is a breach of the deal.
You have no moral obligation to pay a tax that is not levied.
The moral obligation is to participate in the funding of the system you are profiting from. Making money by transporting your goods on roads built by the state, employing people educated in schools funded by state, and enforcing your contracts by courts established by the state but not paying taxes towards this system is wrong.
And this obligation does not go away if you find a trick to circumvent the written rules.
Of course, I am not a lawyer.