I agree with @vpekar that the source of totalitarianism was the war. For the countries that were left out of it got no totalitarian regimes. But I don't think it had to be namely WWI.
After some war, especially a great war or/and a civil war, millions of people are prepared to kill for some idea - they already did it in the war. And they readily accept that easy method of problems solving. But that is only one reason of the two needed.
We should difference authoritarian and totalitarian regimes. In the latter, the people themselves massively participated in the oppressing system and it resulted in much more deaths. Without that mass participation, Hitler or Stalin would be merely authoritarian dictators, maybe even effective ones. As for authoritarian style, yes, it could be useful by itself, in some societies it could be more effective than democratic or liberal style. The autocratic regime is not so terrible by itself. But when it meets with masses ready to kill, it creates a totalitarian regime.
On the other hand, the masses in France were not better. The ideas of nazism were liked there and there were French parts in SS. But the French society didn't require an autocratic regime. And the totalitarian process was not launched.
It was not Hitler or Stalin or Mao who killed tens of millions. They were savaged masses that did that. But it was a dictator who called them to do it. So, the second reason is - an attempt to build an authoritarian society. That fails and the society happens to become totalitarian.
The old societies had raised a pair of generations so that they were ready to solve problems by methods unacceptable in these old societies. These methods were only for outer use - with enemies of for colonies.
The old societies failed to work and the situations demanded authoritarian methods to raise the states...
And that mix exploded! Called to action by new dictators, these generations totally destroyed these societies. With about 100-200 millions of people by the way. Nobody knows the whole number.
What is interesting, we can't say what dictator was crueler personally. Because we don't see into their heads, we see only the results. And the results are mostly the consequences of the state of the nation. And what can divide the personality of a dictator from the enthusiasm of masses? The texts of laws? The Stalin's constitution was the most liberal one in the world.
Edit. I would like to underline that not only an outer war could be the reason of totality state. A failed state could lead to unresolvable contradictions in the society, then to the civil war and that - to the lowering morals of people. The same failed state can call for autocracy - and the same combination is turned on. But the example of Spain rather says that this way does not lead to so great levels of violence, and consequently, of the totality as the way with the war. China was very total, but it had also the greatest war at all - no one state had so many victims as China in the WWII, only it had a different name there.
I apologize for certain primitivization. I only tried to set the frame, pointing to the main issue, that the reason was the combination of two conditions. Of course, very many very interesting points remain open. Should we look at the person of the dictator, or should we consider him and his surrounding as some collective dictator? How that group works?
And how happened the Cambodia terror? IMHO, it is a different case, it had a special level of totality - they had for everyone what other totalitarian states had in camps. And I hadn't ever read about somebody trying to understand that case.
And I hope very-very much that I was right using the past tense here...