So we are in a world where magic is real. There has been a successful revolution against the king, and people try to build a democracy with elections. However there's a problem:
The magic guild (the only ones who are able to practice magic) is decidedly against democracy, and will do everything they can do sabotage or at least manipulate the election. Now fortunately there are ways to find who performed some magic as soon as the magic itself is detected and identified as such (and you don't need magic to do that), and there are ways to imprison someone that cannot be defeated with magic (and the imprisoned mages will not be able to use magic because they will of course have no access their magic wands). Moreover, if the election can be proved to be manipulated by magic, it will be declared invalid and repeated. So the magicians have to employ tactics that are unlikely to be detected.
So the magicians have decided to just have their own candidate and make sure that candidate wins; that candidate will then end democracy and reintroduce monarchy. Now they have some support in the population, but it is far from certain that they can actually win, therefore they will likely also try to manipulate the elections, and of course they will not hesitate to use their magic powers to do so.
Possible tactics include:
Manipulation of ballots inside the urn (using magic, this can be done overtly, for example by moving the cross on a ballot to their candidate, or by changing a ballot for another candidate to an invalid ballot, also ballot stuffing by magically creating extra ballots might be possible).
Subtle ways to prevent people who are known or expected to vote against the magicians from reaching the voting booth (but if they use the magic too blatantly, they will be detected!)
Use magic to get people who are undecided to make their cross for the magicians (in a way that they think they have spontaneously decided to do that; again, if they can recognize it as influence of magic, they've lost).
So how do you protect your election so that undetected magic is prevented as far as possible? Note that the individual votes are, of course, secret, and measures that break that secrecy are not acceptable.