There is a fundamental difference between tax evasion and tax avoidance. Tax evasion is illegal and is actually generally prosecuted under the theft act. Tax avoidance is not and there is no clear definition of what it is. In my view, there is no all encompassing concept, it is an individual judgement. For instance, some would maintain that purchasing a bike for occasional commuting (but mainly for other use) though the cycle to work scheme is avoidance, others would not. Different transactions will elicit different reactions, some uneducated because they have no knowledge of how the tax system works and some educated and prejudiced (most tax professionals, in my considerable experience, have particular prejudices). The only final arbiter we have is the courts and there is a long line of “tax avoidance” cases.
The fundamental determinate in these cases, is whether the legislation as laid down by parliament is to be interpreted as suggested by HMRC or as put forward by the taxpayer. It is as simple as that, either something is within the law or not.
As far as morality is concerned, isn’t the fundamental problem that the executive is incapable of putting together a system that only the well (and expensively) advised can get to grips with.
P.S. The tax lawyers are geeks generalisation is exactly that, although there was certainly one major firm where the quality of the advice was inversely proportional to the quality of the suit.