St. Alphonsus was talking about a scenario where there is no alternative, non datur tertium.
So, for instance, if someone is holding a gun to my family members and telling me I have to rob a bank or else they'll kill them. If there's no way out of that situation, then robbing the bank is permitted since the greater evil would be the murder of my family. This is absolutely not permitted except in a situation where there is no alternative, no third choice. In other words, there is NO MORAL FREEDOM to do anything other than something OBJECTIVE wrong. That is not actually a moral choice, an act of the will; as there's no free choice of evil. In other words, in that scenario, while it would be objectively/materially wrong, it would not be formally immoral. That has absolutely nothing to do with voting ... or with absolutely any other scenario in which one is FREE to do something that is not evil.
This has absolutely no applicability to voting. Unless there were someone forcing you to pick a candidate under pain of death, you are free not to choose either candidate, to vote for a Third Party candidate, or even write someone in.