A person offering a well-reasoned, constructive counter-argument is not a 杠精. The key difference is intent and relevance. A 杠精 argues compulsively, often on irrelevant details, and without a goal of reaching a better understanding. A critical thinker challenges ideas to improve them. Don't label someone a 杠精 just because they disagree with you.
This is slang. Calling your boss or a professor a 杠精 (even if they are one) would be highly inappropriate and disrespectful. Reserve it for informal chats with friends or for describing online behavior.
While both are annoying online personas, a 杠精 is not a perfect match for a “troll.”