Honestly, I’m not sure. I find the premise of such tax laws to be illogical at a basic level. There are apparently always multiple ways to create legal loopholes.
If we consider the Irish sandwich mechanism that was recently “stopped”, somehow that hasn’t materially affected any of the innumerable companies that were using it. As we saw in the Apple vs EU case, most practices might’ve never been actually legal either.
So my personal opinion is that (almost) all tax “optimization” is at the minimum immoral, but most likely illegal too.
Edit: This reminds me of the idea of temporarily embarrassed millionaires. Your personal optimization is not what I’m talking about - corporations have legal teams the size of SMBs lobbying/creating/looking for secret loopholes, and people are talking about public self service methods.