The NSDAP was properly elected.
Using this logic, please explain MAGA in the US. Arguably worse than AfD and currently holding power in all 3 branches of government.
“The iron hand crush'd the Tyrant's head And became a Tyrant in his stead.” -- William Blake
However, arguing that a political party isn't evil because it was elected is absurd. The idea is neither supported by history nor current events.
"Both sides" has become a pretty transparent tactic to deflect the magnitude of the difference.
Looking at historical precedents that tried to undermine this kind of democratic political system (e.g. PIS in Poland, NSDAP in Germany), the political systems were damaged (and are still not repaired) or outright hollowed out.
I think it is important that a dialogue exists in society, Even the radical parties have a chance to exist and represent the political opinion and direction of their voters. However, I think it is even more important than these parties stick to maintaining the very political system that they allows them to exist.
The AFD might not be such a party. In time, democratic state organs might be hollowed out, and an apartheid system might be installed in Germany.
It is worth fighting to maintain a suboptimal free political system than to succumb to madness. At least - in part - we can keep the idiots in check.