"One note, is whether Portugal would copy it. Before the exile, Brazil was made up of more autonomous provinces than after it. Maybe each of these gets a king?"
Portugal's big problem for any ATL is that in the late 1700's and on into the 1800's is that they don't have a surfeit of princes. Joao VI was it, and then his two sons, and then Pedro I had one son (Miguel was kicked out by that time and was no longer part of the picture). You have to start keeping people alive, like Jose (elder brother of Joao). That's a real ATL. It's a globally small change that has the potential to completely change everything simply because it could change the course of Iberian history and with it the Napoleonic wars.
At best, you can split up Brazil with the liberal son, and Portugal with the conservative one. Or vice versa. Miguel's only hope is Portugal, because Brazil is going to kick his conservative ass out in no time flat. He might have stood a chance in Portugal without Pedro coming back, but I doubt he makes it very long. Another excellant, although less far reaching TL is WI Pedro went back to Portugal when Joao wanted him to.
They're both fascinating characters (Joao and Pedro) because they're both overall lunkheads in terms of rulers, but they both had moments of brilliance.
But that's a miller.
Overall, there's a sweet spot to consider splitting the kingdom. Early 1700's is a non starter because the world simply isn't small enough (transportation/development wise) for anyone to consider it necessary or enticing. circa 1800 is the time frame, IMO. On the verge of a shrinking world, while also on the verge of industrialization/developing. Spain had a brief moment where it could have worked, or had the best chance of it working, especially if it took the shot prior to Napoleon wreaking havoc with the divine structure. Multiple sons, multiple daughters to marry to prospective candidates. That would have required way too much forethought to reasonably expect anyone to do, and likely would have led to Carlos to being declared insane or deposed if he did try to do it. I don't think any one of the offspring remotely had what it would take to be a successful ruler, so I wouldn't put any money on any such scheme working. So, really all that's accomplished is a few more years of chaos, and in the end a bunch of republics that are just as disfunctional as OTL.