I expect to burn a few karma points on this, and be ignored, but all evidence I have says that this is human nature at work, and that at scale it cannot be prevented.
I've seen moderators of small communities hold off the effect by setting a good example, using a deft touch, and not letting the community get too big.
My suspicion is that once the number of commenters gets much past Dunbar's number [1], the universal fall into "default jerk" happens. Once that's taken place, you're stuck in an Eternal September.
Communities in the real world don't scale well. I'm not sure why programmers expect them to on the Internet, with its well-known capacity for dehumanization.
1: https://en.m.wikipedia.org/wiki/Dunbar's_number