Doesn't double jeopardy prevent this? Has this actually happened?
Has it happened? Section 49 of the Regulation of Investigatory Powers Act 2000 has a secrecy requirement built into it, where if you tell anyone that you have been issued a Section 49 you can get an additional 5 years (treated as a separate crime). This, as you can imagine, makes your question difficult to answer.
Legislators should force future would-be tyrants to flagrantly violate the law, as this is more likely to generate popular resistance.
The point is that these laws aren't badly written. There's already protections in place for what's described above.
A great example is the CFAA. It has been judicially narrowed after court battles, because in its original form it was overbroad and criminalized basic, common things. Prosecutors abused it in order to get political wins until they were finally stopped.
This is unfortunately fairly common. Legislators either push for too much or don’t understand how the law might be applied, and innocent people suffer until someone wins a big expensive set of appeals.
Edit: I realize now you may be talking about the UK in particular, in which case you don’t even get this shoddy level of protection as “Parliament is sovereign” (lol).
Why the "for crying out loud?" That's an example of the law being well written in a way that covers the knee jerk reactions to "it's too broad, it's badly written!"
> the government's own advisors that are the ones raising concerns with the broad applicability
What's your issue with this? They're advisors, it's their job to raise concerns that lead to the inclusion of exemptions like the one you're "crying out loud" about.
> it wasn't even considered in the original drafting of the bill.
That's why bills go through various stages of drafting and debate, and why parliament seeks out and considers the advice from industry. It's "laughable" to judge the quality of a law by the original draft, just as it would be too judge a piece of software by the initial commit.