That is exactly how history works.
Many of the things Stalin did can not be explained by that theory. Stalin already was in complete control, more so then almost any other dictator even.
Yet he risked when he collectivised agrocultre that for essentially idiological.
We know that Stalin saw himself as an intellectual, he read a lot and not just marxism. His last great work was a book about the economy, he spent years working on it. Everything we know about him, and how he grow up shows his intense interest in marxim.
Read his letters when he was in exile, all he does is ask for books.
I mention de Mesquita because I think his collectivization policy was very much in line with reducing the size of the selectorate and strengthening his control. That said it's hard to assess that theory in terms of collectivization and industrialization in only a couple of sentences, so I apologize if that seems hand-wavey.
My problem is just that while the farmers had power as a collective, they could really not threaten the political survival of the dictatorship.
History suggest to me that Stalin had reached absolute power and then he finally could dedicate himself to what he actually wanted to do.
The reason collectivization does not make sense as a strategy for political survival is that it massively endangered his position. He had major opposition to these polices because of how extremely damaging they would be.
However, when you try to completely change a whole society, destroying a very large quantity of its economic assets, while also doing massive internal reforms, both in the state and the party, you put yourself in a dangerous situation. Not primary because of the farmers but rather that the very political system you build your power on starts to collapse.
> Stalin was able to blame the farmers for trying to hoard grain and eliminate their leaders
Not sure what you mean by 'he was able to blame', of course he was, he controlled virtually ever channel of information.
Most of the population, and certainty the farmers did not 'buy' this propaganda.
> And as we can't see the future, it wasn't obvious beforehand how bad of an idea collectivization would turn out to be, so I presume he felt it was a gamble worth taking.
Literally every single expert, including communist from his own party knew it was a horrible idea. Its not like this was the first time they tried to get the farmers to do things they did not want to do. During the initial (1917-1921) attempted to claim the farmers property they learned that it was not at all an easy thing to do. The hole regime almost collapsed in 1921 and they had to bring back markets even when they hated the concept.
He had to replace lots of people and use every political tool in the book to actually manage it. Its a true testimony of Stalin political control that he was able to pull this off.