In practice, relatively few socialist/communist regimes had what could be charitably described as democracy (with the exception of the Nordic countries), but when the political philosophy really gained steam in the early 20th century, many of the branches of socialist philosophy were rooted in democratic control, of all society. Even during the Russian revolution, socialist takeover mean democracy within the government, the factories, and the military. It was only later once the Bolsheviks consolidated power that reality shifted away from that, under the shadow power structure of the party.
As I alluded to previously, though, the Nordic countries were largely governed by socialist parties for much of the 20th century. They didn’t devolve into dictatorships.