I think you are conflating the two because of the case of Soviet Union.
A) Soviet Union was not communism. Communism never happened. Communism/communist society is an ideal.
B) Soviet Union was a totalitarian state, yes.
C) One of the main concepts in communism is that there is/should be no state. Totalitarianism assumes that there is a state. This is in every definition of communism and totalitarianism. Here I'm going to quote it from the first line of each from Wikipedia:
"Totalitarianism is concept of a political system in which the state holds total control over the society"
"Communism ... absence of social classes, money, and the state."
So yeah, "hasn't been done right yet". Could you hypothesize who in a true-scotsman communist non-state would regulate people's output ("ability") & input ("need")? Who would enforce the laws? If "everyone and anyone" is an enforcer, then claiming there is "no state" is sophistry.
That's right. You know how scientists had this theory that there is a particle they haven't observed yet, but should exist? They called it Higgs boson and constructed a lot of expensive equipment to try to prove that it exists.
You have to make a distinction between theory and practice. You can criticize communism as a concept or you can criticize existing and past communist states, but those two are not the same thing.
Dismissing communism solely because of Soviet Union, Cuba or China would be the same as dismissing democracy solely because of Richard Nixon or Condoleezza Rice.