The best way to secure elections is to have a system where winners have to give up worldly pleasures, ties and all privacy to rule.
It works great for the military and for the clergy where it is even worse. I don't know why we don't something like that for the rulers.