The secret is not secret if you think about it. It's no secret that paying attention will help you avoid most mistakes. Focus and attention to details. Yep, that's one way. But it's often a tedious and difficult thing for those of us who are easily distracted by the shiny thing in the corner, whatever corner that might be, real or imagined. So we move without looking and often move in the wrong direction.
Now here is a how to lower the mistake count -- unless you have never made one of course -- plan not the individual attempts, but all attempts at once. Stop now, analyze what the most efficient and mistake avoiding route for your behavior is, and then use it. If this doesn't make sense to you now, hopefully it will in a moment.
When you start the game you are thinking of doing X. Nice, but if X isn't appropriate at the beginning or worse, if you do X when Y needs done, you make that dreaded "mistake" X shouldn't be on your mind, Y should be, right? In this case the most efficient method of avoiding mistakes is to have a pattern of behavoir that prioritizes each thing you could so that what ought to be done first is ALWAYS done first.
Example: I open my game and look first at the quests. Every time. Quests first. Then I LOOK (not click) at production. If it's finished I consider the time I've spent in that production and ask if I need an enchantment for it (or usually the whole lot). Depending on what the quests say (and the next one and then next one until I can't predict any more), I THEN begin to click, click, click. Quest, production check, decisions, click. If you are thinking as you load, "I've got to grab my production" you are going to forget to "check if I need spells," and thus it will be too late. Proper order is: Survey, Consider, Click. Survey what you need (i.e. quests to be done, productions to be collected, troops to be built, spells to be put into the queue, etc...) then decide the order of to do them, and finally click. The "survey and consider part" really takes only about 10-15 seconds at most and can save you hours of work or re-work because it avoids the "missclicks."
Well,that's my method anyway and while I do make mistakes they are usually when I'm collecting and move my unsteady had over something I didn't want to collect yet (and I'm aware that I don't want to collect it because I did my survey of the upcoming quests and know that the next quest I do needs it), and collect it. accidentally.
The key is to be self-disciplined and do the same thing every time, whatever pattern you find avoids mistakes.
AJ