This is the crux of the matter, how do you know a comment is a troll, rather than an honestly held and expressed contraversial view? parent's point is that you can't in general. So it's up to defaults: default to assuming bad faith and you will be rewarded with swift oppression of trolls but also honest mavericks whose contraversy help stir things up and invigorate discussions, default to assuming good faith and you tolerate both with mixed results. There is no easy answer.
Recommended read on this is Paul Graham's "What you can't say"[0], a timeless piece on how the bathwater of offensive and unpopular opinions always contain the baby of non-conformist truth, and you don't know in advance which is which, so you need to tolerate the first lest it is actually the second in disguise.
This is good, do this. The worst thing in threads IMO is endless subthreads attached to low-effort troll comments. Just downvote and move on. If the comment contains a factual misstatement, maybe post a quick note saying why it is incorrect, with a reference.