The funny thing is that this is exactly the same fallacy programmers tend to run into when trying to game the legal system: that you're not violating the
letter of the law, doesn't mean what you're doing is legal or that you can't be sued. It's not just a bunch of code.
The problem with taxation IMO is that it's caught in a vicious circle: companies / "the rich" are dodging taxes so the taxes need to be raised leading to more tax dodging and so on. Part of the problem is that tax fraud is often not punished in proportion to the actual value[0].
I don't think there's an easy solution, especially in a world that is as interconnected as ours is today.
Personally, I think income tax is a broken model because property is no longer a good indicator of wealth (it just encourages "investing" the money where it can't be taxed -- which comes with a threshold so high you end up hitting the middle and lower income households disproportionally).
Taxing the transfer of wealth more instead of its possession seems like a good idea, though. It might "slow the economy down", but with sub-millisecond stock trading being a thing I'm not sure this is a bad thing. It's not as if a huge income would be particularly useful if you aren't going to do anything with it anyway.
[0]: A recent case in Germany was Ulrich Hoeneß, the former president of the football club Bayern Munich, who was found guilty to have withheld nearly 30 million euros in taxes (after repeatedly admitting to much lower sums throughout the trial -- which to me sounds like obstruction, but what do I know). He was sentenced to three and a half years in prison, BUT an early release is extremely likely (so it's doubtful he will spend anywhere close to the full sentence behind bars) and after a mere six months he was already granted day release (meaning he can walk freely outside prison as long as he returns in the evening).
EDIT: Frankly, I'd be happy if income tax was replaced entirely by some form of transaction tax. It's far easier to reason about and far less likely to bite founders in the ass. In Germany most newly founded business go bankrupt in their third year because that's often the first time they not only have to pay tax on the previous years but also make advance payments for the current year, which can be deadly if you didn't make sure to put aside enough of your income to cover taxes (and accountants are expensive).