No, they didn't, because while this was happening in Russia, the Austrians were busy waving swastika flags and assisting their brudervolk with sending people to Treblinka and Auschwitz instead. No disrespect against the Austrians, and I am sure there were many who would have preferred not to, or re-write history a bit, but it's what happened.
Yes, the USSR/Stalin relocated people, during the war; it was probably completely misguided, but at least they didn't kill people on purpose. And the USSR stopped that when the war was over, and only a small minority of the population was affected.
Nobody here is old enough to remember those days. I don't want to sound like I'm defending that, because I'm not, but it was different times. When anyone here speaks of the USSR, they speak about the 1960s-80s
Of course they had a functioning justice system; there were regular criminals there, like everywhere else. Thieves, smugglers, black marketeers, violent people, hooligans etc. And probably also people who were wrongly accused of a crime and needed a fair trial to be acquitted. My understanding is that such a system existed in the USSR, at least from the 1950s onwards, and that only a fraction of criminal cases in the USSR had the slightest to do with politics.
I know that English speaking countries tend to believe that only trial by jury is fair, but most continental European countries don't use that system, and leave it to judges after hearing counsels of both sides. As far as I know, the USSR had non-jury trials in which the prosecutor and legal counsel of the defendant presented the case in front of a judge and citizen observers. Personally I think a professional judge, if he is reasonably unbiased is more likely to judge fairly, than a jury.
As to what happened during the second world war: All the countries involved did horrible things during the war, didn't they...? Enough said. Plus, the extreme actions of Stalin, and his personality cult were condemned by his successors, and it was not repeated again.
As for after the Russian revolution: The revolution took place almost 100 years ago, in a much harsher era. We can't judge their actions then, by today's standards, even though I agree that the bolsheviks were brutal and didn't have a great deal of respect for lives of their perceived enemies... In the rest of Europe, we had illiterate children working 12 hour shifts in factories, and peasants who weren't allowed to leave the estates of their land owners. So it's relative....
Also; this was right after the most brutal war the world had ever seen; First world war with the gruesome deaths in the trenches, mustard gas and all that. Many, many more people died in that war, than in the Russian revolution. One of the first things the USSR did after it was founded, was to withdraw from this practically meaningless war, which achieved nothing other than set the scene for the second world war.
I think the big difference, and what you are getting at, is that in countries like the USSR, the difference were that judges had to be communist party members and loyal to the state. Modern China probably has the same setup. So they would perhaps go along with some ideologically motivated judgments on rare occasions when something like that came up. I think such cases were very much exceptions. But that's why they appeared to use the criminal system against people who won't conform with the ideology or went against the state.