Did Sparta have totalitarianism?

Yes. Sparta was a totalitarian state. Every Spartan had no choice, from cradle to grave, on what they were allowed to do. The government controlled every aspect of their life and fed them their ideals on bravery and strength.