That does not mean that a United Kingdom could not be attempted. First treat all people living in Portuguese American provinces as equals to those in metropolitan Portugal. Maybe allow some of more loyal subjects in Brazil to attain aristocratic titles and mix that with aristocrats from Portugal so that joint kingdom can be developed. But you cannot make it a colony again that will buy Portugal 20-40 years tops till either constitutional monarchy is introduced or there are too many revolts and it all falls apart.
It doesn't matter how many political malabarisms you do, if the Portuguese Elite controls Brazilian fiscal and economic policy the Brazilians won't be happy. There's pretty much nothing that a country with the socio-economic conditions of Portugal can do. Brazil is already as populous as Portugal during the early 1800's and Portugal can't even start to supply the demand of industrial goods for itself, nor for the Brazilian elite. That's Economics 101.
Hum...ok, so I guess that would leave us more or less with this:
If interested, here you can see a more correct map of the Brazilian Empire down bellow. By the turn of the 18th century, most of the population is concentrated around Recife, Salvador and the triangle between the cities of Rio, São Paulo and the auriferous area. Therefore, already by the 1820's you can see the clear dominance of today's southeastern region. For example, the first nation-wide census from the 1870's determined that the city of Rio de Janeiro itself had more "souls" than all the Amazonian provinces... The only regional identities that you can effectively play is Recife/Salvador vs. Rio/São Paulo and, even so, they're both planter societies that can easily agree on a common fiscal policy.
Still, if ITTL the Portuguese agree on giving economic liberties to the Brazilians (so that no tax money goes to Lisbon - pretty much like British dominions), what would be the point of Portugal keeping Brazil in the first place?
Portugal have nothing to profit from it, as it can't even supply its own demand for industrial goods, one can't even imagine Portugal being the major economic partner of Brazil. Furthermore, it'd mostly be detrimental to Portugal's economic development as a political union would make easier for capital and human resources and capital simply flow to virgin American lands (which was already huge in OTL without a political union).
With all that being said, I think that we can only have functional political union with a stronger industrialized partner, and for Portugal to be an industrial powerhouse you need a century old POD. When both partners are poor and divided by an ocean, it only works when one is weaker, once they both have the same economic capacity, it's clearly unsustainable.