During the nineteenth and early twentieth centuries many of the world's monarchies were removed. By "the world's", one is essentially meaning "Europe's". That is where most of the highly sophisticated monarchies seem to have been located. Now relatively few are left; continually and carefully changing so as to remain in place.
The way monarchs were previously deposed was somewhat blood-thirsty. One would hope that such an approach would not be adopted in future. So how might one get rid of a monarchy humanely and permanently?
One way would be to hold a referendum each time a monarch dies, not on whether to continue with a monarchy but on whether to accept the incoming heir to the throne as the next sovereign. If the will of the people is to accept this person so be it. If the will of the people is not to accept this person then the monarchy should be held in abeyance and an interim presidency held until the unwanted heir dies. At that point, it should be put to the people whether they are willing to accept the next heir to the throne as monarch. If it is their will, so be it; if not, the period of interim presidency continues. This might be allowed to go on for up to three successions perhaps. If three heirs are rejected by the people then the monarchy might then be deemed to have been abolished.
This offers a gradual transition from monarchy to presidency allowing people the opportunity to sample what a presidency is like and to change their minds when a potential monarch becomes available. It also allows people an opportunity to make their feelings about an heir to the throne felt. The current like-it or lump-it approach is surely outdated in an age when people should be exercising their own freewill.