A related issue is “vote for my preferred candidate, or I’ll abuse you” as a way for husbands to control wives. That’s especially relevant when one party is favored by a majority of men while the other party is favored by a majority of women.
You can also do this today by telling someone to take a picture of their vote by smartphone or you'll shoot them. Millions post a picture of their ballot on high-energy political forums every 2 years already. This hypothetical is unhelpful.
Where I live, ballot are a piece of paper slipped into an envelope (not sealed). It's mandatory to take at least two different ballots before entering a voting booth. You can take a picture with one ballot inside the envelope and switch before leaving the booth.