Vladimir Korolenko described it pretty well in "Everyday Phenomenon" (1910), and "Features of Military Justice".
But more importantly in this case Nicholas didn’t have nearly as much direct power as Stalin did (he was extremely incompetent as outright stupid as a person) and had to rely on his government to actually make the tough decisions.
They also functioned quite differently, the Imperial security had never had a fraction of OGPU's power, so the methods were different. OGPU didn't care at all about planting evidence or manipulating witnesses, they could just torture people into signing confessions (called "the queen of all kinds of evidence" by the USSR chief prosecutor).
So any similarities are probably just a result of parallel evolution.
While I did appreciate Ivan Grozny seeing the Repin painting in Shurik's apartment in Ivan Vasilevich menyaet professiyu (1973), I was a bit disappointed in that (at least with the youtube version?) the actor turned his back before crossing himself in the elevator, which would've told us if Gaidai knew/cared about Old Believer sibboleths.
To be fair you have to go really far to get back to the times when the Tsar could and would execute random people for arbitrary reasons and without that the joke is no longer funny.