My understanding is that people tend to cooperate in smaller numbers or when reputation is persistent (the larger the group, the more reliable reputation has to be), otherwise the (uncommon) low-trust actors ruin everything.
Most humans are altruistic and trusting by default, but a large enough group will have a few sociopaths and misunderstood interactions; which creates distrust across the entire group, because people hate being taken advantage of.
... towards an in-group, yes. Not towards out-groups, as far as I can tell.
Though for some reason this tends not to apply to solo travellers in many, many parts of the world.
Lots of debate, yes, but very little about the basic fact that Hardin's formulation of "the tragedy of the commons" doesn't describe actual historical events in pretty any well documented case.
Although, there are other large-scale examples where tragedy of the commons has been (practically) avoided: ozone depletion and Polio eradication. Wikipedia (https://en.wikipedia.org/wiki/Tragedy_of_the_commons#Non-gov...) also mentions Elinor Ostrom, but her examples involve "smaller numbers".