So he falls down a flight of stairs and breaks his neck before he can declare independence?
Well, if you have no Pedro after John VI left Brazil then it's even more difficult. IOTL he wanted to rule both countries, he only declared the Brazilian independence because the Portuguese courts ordered to him to go back to Portugal. With no Pedro then the heir of the throne would be that crazy absolutist Miguel, and the Brazilians would declare independence as soon as possible.
A POD in 1822 is too late to keep both countries united (you can delay it, but not avoid it). You need something before 1820, when the Porto Revolution happened. After this, the liberal Portuguese Courts demanded that the royal family should go back to Portugal, and Brazil would have the condition of kingdom lowered to colony again. The Brazilian representatives in Courts were very few, and could not avoid it. The Brazilian elites then realized that they would be always a minority in the Courts, and would never have the power they had when John VI. So, they convinced Pedro to declare independence. If you have no Pedro then the situation is the same, but now you have no one to make Brazil a monarchy. The whole coutry would break, with some provinces becoming independent republics, and others in the North remaining as Portuguese colonies, but not kingdoms.
My suggestion is a POD before 1820, something that could avoid the Porto Revolution or make it weaker, in order to have it accepting more Brazilian representatives in the courts and avoid the extinction of the Kingdom of Brazil. The ideal would be keep John VI in Brazil, and when he dies the Brazilian friends of Pedro convince him to declare that he would only go back to Portugal if Brazil is allowed to have an independent Court too. Then we could have a system like the British Commonwealth.