From my understanding, the 1889 coup was the result of Pedro's daughter not being seen as an acceptable heir by neither her Father nor the General Assembly, which emboldened the Republicans to overthrow the monarchy. If Pedro's sons did not die in childhood, live long enough to marry for alliances with European nations, and eventually take the throne from Pedro when he either dies or abdicates, could the coup still be attempted despite the clear path of succession?