I'm not sure that keeping the Habsburgs out of the Netherlands is for the best given how much money they got from taxes and the importance of Dutch and Flemish merchants, a
The thing is that those are good things for the Habsburgs but bad for Portugal. The Netherlands was our main northern comercial hub and all we wanted there was peace, we didn't cared about who controlled it we just wanted our trade to be left in peace and that included avoiding war in Flanders, being dragged into the wars there against the Dutch Republic pissed off many merchants that had initially been more than happy to be under Spanish control, after all they had gained easier access to Peruvian Silver and Spanish Colonies had been opened to our Slave Trade, but that good will was shattered when Madrid imposed embargos on the Dutch because of the war between the two powers.
and I'm certain that the Habsburg alliance is a good idea which is why it happened in the first place given the inevitable conflict with France over Italy to say nothing of French designs on Catalonia. Likewise the Ottomand are going to be butting heads with Spain over the Mediterranean so an Austrian alliance makes sense there too to open up another front.
Again this are things that favored the Habsburgs but not Portugal, and that was what poisoned the relationship between Lisbon and Madrid.
Fighting with Austria and Spain against the Ottomans? We would be more than happy to help, after all we spent the full 16th century fighting the Ottomans over control of the Indian Ocean and screwing them in Europe would be a bonus. But being dragged into the conflicts in Italy, Germany and being opposed to France was against our interests, specially because we depended in imports from those areas to keep our armies and fleets in India well supplied, and for those in power it looked like we were investing much more in protecting the Spanish-Austrian interests than they invested in protecting ours. We send men and ships to help Spain invade England, and to all the other conflicts to which they dragged us, and when we needed help in defending the colonies against the Dutch we were ignored and told that we had to send more help so that Madrid could defend their possessions.
The devil is in the details- have a different division of the Habsburg inheritance or a less bungled response to the Dutch revolt, or have the Habsburgs inherit England as well to complete the encirclement of France.
My favored Pod would be a surviving son of queen Mary who retains the English throne and gets the Burgundian Lands as well, as well as whatever bits of northern France (Picardy, maybe one of Brittany, Aquitaine or Normandy) they can take when the Valois inevitably raise a stink.
The devil is that the interests of the two countries were opposites. Spain had interests in Europe and wanted to expand their possessions there, Portugal wanted peace in Europe so that we could continue our expansion in India and in SEAsia. If they had ignored the Burgundian lands and northern Italy, and had steered away from conflicts in Europe, except against the Ottomans, those with power in Portugal would had little reason to rebel against Madrid, and to that matter Catalonia would also had little reason to rebel as well.