All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
It is permissible to avoid illegal taxes with the method that you mentioned or other methods as a way of repelling harm. There is no sin on whoever does this. Nonetheless, if the taxes are legal, then it is not permissible to avoid them in any case.
The legal taxes are those which the government takes from wealthy people in case there is a shortage in the resources of the country, to an extent that the country is unable to provide public services, like digging wells, tarmacking roads, building hospitals and the like. In this case, it is permissible for the government to impose some taxes on people, each according to his ability, in order to provide those benefits. In such a case, it is not permissible for you or any one else to avoid paying tax if you are able to do so.
For more benefit, please refer to Fataawa 84560, 89947 and 90173.
Allaah Knows best.