So, to prevent that from happening, we ought to dismantle free speech and democracy?

Only if you think in absolute ones and zeros

You can prevent organizations whose aim is to destroy democracy by exercising some restrictions on democracy without completely dismantling free speech and democracy.

just as for example you may jail someone and completely restrict their freedom in order to protect others, without completely dismantling democracy

Except in this case everyone is being jailed, to keep them safe from the criminal.