Yes it is have Ferdinand and Charles be executed by the guards after some disastrous defeat for France and then have the other Charles die in battle. Then Francesco de Paula is King of Spain, and following the end of Peninsular War, he retains the Constitution of 1812 and asks that the fighting stop (at this point people were fighting in the name of the King of Spain).
The colonies loved the highly liberal Constitution of 1812, it gave them an equal say in the government. The thing was OTL Ferdinand VIII did away with it.
With Spain retaining its Empire they would probably have a stronger navy. Also with the constitution we might see colonies having their own defense forces. Another good thing would be if the new Spanish regime in Mexico City rejects Stephen F Austin when he comes back down to confirm the old agreement.
Or for a far back POD have Spain send more colonists, OTL it sent half the colonists the British did