We have quite a few imaginary examples of countries with mass survelliance ("1984", etc), but do we have any historical examples of countries engaging in mass survelliance? And if yes, have any of those countries avoided becoming totalitarian?
The question was raised by a famous cryptographer Bruce Schneier in this article, but was not answered.
The question was raised by a famous cryptographer Bruce Schneier in this article, but was not answered.
This isn't as good or insightful a question as you might think it is.
Pre-modern governments tend not to have the power or technology to conduct surveillance of individuals en masse in society. The pre-modern state tend to be laissez-faire by necessity, even centralized governments like imperial China's rely on the local land only gentry outside the government for administration below a certain level. There might be surveillance of segments of the political elite, or the occasional purge of commoners, but day to day surveillance of ordinary people's lives are well beyond the capacities of pre-modern states.
Totalitarianism in this sense is also anachronistic, because even the most brutal governments would not be able to exercise the power that, say, the USSR had over its citizens outside of perhaps looting and pillaging during war time.
So you are only really asking about the 20th century, and the answer is that historically speaking regimes which had mass surveillance actually collapsed and turned into more democratic entities. The Statsi and East Germany, the KGB and the USSR are probably the two best examples of this.