ESD effect on MCU pin
Pins configured as "tri-state" are inputs.

Pins that are actively driven high or low are at a low impedance, which makes them less susceptible to ESD.  Outputs driven low are one case of that, so yes, that is a good thing to do with unused pins.