Actually there seems to be a lot of intent in tax law, reading the wikipedia page about the Apple/Ireland controversy - some tax mechanisms/structures are specifically called out as not being available for firms looking to reduce their tax bill, use must be for genuine business requirements only.
despite what a lot of people think, you can ask for forgiveness from the IRS and will typically get it if you're a first time offender and it's clear your intent wasn't malicious.
Same with HMRC in the UK, as an individual taxpayer if you call them up and say “I screwed up, can you help me sort this out?” then they’re quite good at helping and often able to lift late fines etc.