It was a reasonable calculation to assume they could take Ukraine, but also the same could be said for Napoleon or Hitler, taking Russia as well. And thus why history repeats itself. Every time a leader makes a choice like Putin did, they always have a reasonable calculation for success at the outset. Hitler and Napoleon aren’t the only ones, it goes all through history over and over.
It’s still a massive blunder in the end, and despite reasonable calculations up front, ego always plays a part in it.