Unpopularity does not equal righteousness. Only loneliness.
I'd say "not necessarily equal" righteousness.
Sometimes "the group" is wrong and iconaclastic "anti-social" individuals are right.
William Lloyd Garrison and Dietrich Bonhoffer come to mind.