Quality and I agree. Miguel to Portugal alongside Maria and the other girls remaining in Brazil to boost thensuccession rhere. I imagine then that Ferdinand and Maria would still be marrying.
Should there be a miguelisr war with Pedro brother Miguel attempt to take the throne? Or would he not do that due to Pedro having two sons?
The issue between the brothers had less to do with a Carlist-esque fight over female succession and much more to do with Pedro being a liberal and Miguel an absolutist. That's not going to change with Pedro having another son.
Now if having another son causes Pedro and his father to hammer out the succession/Pedro abdicates his succession rights in favor of Miguel before his father croaks and leaves an ambiguous will, there might be less hold for Miguel Sr.'s pitch. IOTL it took Maria two years to leave Brazil for Portugal, and two days after she boarded the ship for Europe her uncle Miguel declared himself King. If Miguel and Maria leave for Portugal in summer 1825 (after recognition of Brazil's independence) when their grandfather dies the following year at least the new King and Princess of Beira will be in Europe, never mind Portugal, and the question of who's actually in the line of succession will have some clarity.
Of course, there will be some regency shenanigans, particularly as the royal family sided with Miguel's absolutism over Pedro's liberalism, but less succession chaos will help the situation. The main issue will be that if Miguel Sr. becomes regent he will either try to persuade his young nephew to take up absolutism or, if that fails, possibly follow his OTL track of declaring himself the King. Whether that will work when the monarch is in Lisbon rather than on a boat leaving Brazil is up for debate