Bonaparte was a genial but to damn stubborn. In fact a Cardinal directly said to him . Spanish monarchy are totally and utterly dumb and easy to manipulate. Just control them from afar. Don’t try to take it and anger the plebe.
It is something that many leaders forget in their success don’t take everything for granted . You can’t take everything by yourself and you cannot end in a total war with absolutely all the empires around you same time. Lije Why in hell He attacked Russia?