In the UK, this is handled by making all the ballot papers different colors. The voter writes their cross on each ballot, then folds the ballot in half (so that the election officials can't see the vote) and puts it in the relevant box. The election officials check, by looking at the color of the paper, that the voter's putting the paper in the right box, and corrects them if they aren't.
If a paper goes in the wrong box anyway, it can probably be moved to the right one during the count, because the papers are counted by hand. (Whoever was counting the paper would notice it was the wrong color and put it in a separate pile for incorrect ballots, which are checked by the candidates.)