Yes, not only both of them are based on totalitarianism, they are also totalitarian systems based on ideology.
But there is more. Both began as support for the working class after World War I (in Germany). In fact, both the Communist Party and the Nazi movement fought for their influence on the workers and other disgruntled groups. They also used very similar methods like organizing strikes, providing support and shelter to the workers, using propaganda as the main method of communication, playing the nationalism card, nationalizing companies and seizing private assets for planned productions etc. Also their militaristic aggression as a means of expansion of their ideologies bears many similarities: Soviet in Afghanistan, Vietnam in Cambodia, China in Korea and beyond, etc... Even in terms of the will to genocide/mass kill the "enemies", they are not far from each other: Nazis and the concentration camps, Khmer Rouge and their killing fields, China and the Uighur prison camp/Cultural Revolution, Soviet Union and the Holodomor famine in Ukraine etc...
With enough power, both communism and fascism will tend to extremism and will not shy away from military aggression to spread their ideologies.