Your initial question and the highly upvoted answer imply you submitting another UK visa application. However, a comment you gave on that answer implies you applying for a third country’s visa. The UK case has been sufficiently (imho) covered by MadHatter’s answer; instead here I will focus on the third country case.
In general, I consider every visa application something whose approval is very important to me but not to the country I’m applying at. If I don’t receive a visa, there goes my holiday/business contract/conference/summer school/etc — these are very high risks to me personally. On the other hand, the country gets thousands or millions of applications annually. If they don’t accept you — well, that’s one visitor less but one we probably could have done without. Their high-risk case is accepting you as you could do all the things they want to prevent. (What exactly they want to prevent depends on the country; North Korea will have vastly different standards from the UK, to name to examples on different ends of the scale.)
Since it is me who wants the visa, I want to paint myself in the best colours when applying. However, there is a massive information imbalance between the country I’m applying at and me. They usually have access not only to the history of all visa applications posted to them but possibly also to parts of other countries’ databases. They have a secret service and maybe agreements with other countries for sharing information. This is especially the case for the Five Eyes, for which you should, as a rule, assume every one knows everything.
Now naively, I may assume that classifying the overturned refusal as never having happened would be a good thing. The argument is clear: the ‘expected’ answer to this question is a ‘no, I have never been refused’ and any variation of ‘yes’ may immediately raise eyebrows and harm your case. However, remember the information imbalance. It’s not unlikely for them to be able to ask the right people, pull up your information and note that there has been a refusal. Henceforth, they usually won’t care if it has been overturned later, they will see this as having proven you a liar. This damages your chances everywhere.
On the other hand, if you answer ‘yes, I have been refused somewhere previously’ and then proceed to briefly point out the details (i.e. that the refusal was overturned), this paints you as
- being honest
- probably actually a genuine visitor as another country revised its decision (rare)
Weighing the potential costs and benefits of both routes, I would very likely choose to declare the previous refusal along with the overturning and provide a (very!) brief description of the process. If there is no text field near the question, there may be one at the end of the application or I may append a supporting document.
I also read you saying
Why should I have to explain someone else's mistake?
Again, this is the risk imbalance that I outlined in the second paragraph. It is you who wants the visa and you have good reasons for it. You are potentially losing a great opportunity. The country you are applying to is losing a single visitor; something they probably can’t even write in a percentage — even if you are planning on bringing your family. They don’t care if you get the visa. But you do. So you want to explain any unclear circumstances.