Personally I think it is more 'they ensure they will get attacked and bite off more than they can chew'. Since the fundamentals of totalitarianism just plain aren't sustainable. I mean Hitler's economy was a conquest dependent mess and the Soviet Union ended up collapsing under its own weight.
As for ending up attacking each other I think that is a general authoritarian thing with purging to take/secure power - it happens with communism and it happened with monarchies.
One interesting outlier along the lines was Fascist Spain. It was caused by a chain of events caused by internal attack of fascists for their own cynical reasons. [https://en.wikipedia.org/wiki/Assassination_of_Luis_Carrero_...] Combined with a secret liberal king, Juan Carlos and the power was used to restore democracy.