Dr. Strangelove
Banned
I still think that the time from Charles IV to Ferdinand VII was the best and last opportunity for that.
Actually, I think that the best chance would be with someone other than Charles III succeeding Ferdinand VI in 1759, or Ferdinand VI not being a maniac depressive who died prematurely. Yes, Charles was a very competent king who modernized the crown, made many needed reforms and expanded the power of Spain to the point that it could be argued that the Spanish Empire was more powerful in 1775 than it had been in 1575 -in absolute if not relative terms-; but it was not enough. Towards the end of his long life Charles became increasingly intolerant and repressive, and his heir Charles IV could charitably be described as "well-intentioned incompetent", who was too old and indecisive when he arose to the throne in 1788. It was impossible for Spain to weather the storm that would start in 1789 with someone as spineless and incompetent as Charles IV in charge.
Ferdinand, however, was a prudent and progressive man who started a trend of reforms in the empire, and, more importantly, decided that neutrality was the way to go for the Empire, refusing to be entangled in, for example the Seven Years War. In the final half of the century, Spain should have become a second Britain, using its relative isolation from the european continent to forget about european adventures and focus in the empire and its modernization; and, like Britain, ruthlessly using diplomacy and realpolitik to ally with whomever was the most beneficious. With Ferdinand having lived longer and being succeeded by his son, Spain would be in a better shape to weather the 1789 storm.
Re. Aranda's federalization scheme; it would be very beneficial in the short term, but, being a spaniard, I know that our innate cainism would make it fail ultimately. You cannot give four spaniards absolute rule over half of the world and expect that they will not start bickering about god knows what idiocy.