First off, let me put a point which opposes a common presumption in the other existing answers. The OP notes
As moderators, being seen to actively prevent the user from being elected could be disastrous.
From that it should be apparent that the OP is seeking how a moderator, rather than an administrator, should act in the situation in question.
Anyway, regarding the issue of the OP, following the following points should not be a bad idea:
- The user in question is described, by the OP, as "problematic" partly because he/she "frequently disagree with existing moderator practices." However, disagreement over community norms/practices is not only a drawback but also an advantage for a community to thrive. So that should not be considered as a weakness for one as a prospective moderator, but as a merit.
- The user is also described as "harassing users". If this is so, why did the moderation team not take effective disciplinary actions about the user so that he/she would have stopped such misbehavior, regarding that in a healthy community harassing members is a blatant instance of violation of the code of conduct? The remaining possibility is that the harassment claim is not fair and factual, so the moderators need to improve their view on the user's behavior. Moreover, there is some inconsistency in the OP's description of the user: How, in a healthy community, would a problematic member harassing others become popular?! In a healthy community no such member becomes popular. If the community is unhealthy, one should leave it as soon as possible.
- From the picture depicted by the OP, it seems that the moderators and the user have opposing attitudes toward the ways the community should be moderated. In communities it often happens that a group of like-minded people comprise the moderation/management of the community so that those who have attitudes far more different from the moderation mainstream are usually regarded as "problematic" by the community governors; in fact, such people are so immersed in their mainstream that they (unconsciously) believe that their moderation decisions/actions are undoubtedly the best ones and so opposing attitudes must be frivolous. However, history has shown that in many cases opposing ideas have been the best, so some revision of the moderators' view might be needed. Moreover, the "popularity" of the user might signal that there are some community members disagreeing with (most) moderator practices. So having the user as a moderator might make the moderation team more balanced, which would likely bring more trust in the moderation team to the overall community.
- It should be noted that election is an integral part of a community governed by the people; in such communities one of effective ways members can express their attitudes about how their community should be governed is electing officials supporting their views. So depriving certain member(s) of being elected as a moderator would be considered unacceptable by (most) community members supporting the democratic nature of the community.
Lastly, noting the points mentioned above, let us have an explicit answer to the main concern of the OP, namely,
What can be done to protect the community from a moderator who could seriously unbalance the existing moderator team?
The answer is now clear. There would be no risk and threat to the existing moderation team and the overall community in the case of a user unbalancing the moderation team being elected as a moderator. It is entirely natural (and indeed constructive) to have utterly different opinions in a team governing a community, like a democratic parliament comprising (opposing) political parties. Nonetheless, final decisions made through some well-defined mechanism, say, a voting process, will be considered as unanimous outputs; if need be, such a mechanism could be triggered, and/or new elected moderators should be requested to follow it.