No, it won't hurt the drive. Hard drives fail primarily due to mechanical defects, mechanical abuse, and power spikes. The drive doesn't know that it is being formatted, it just experiences the write load of the reinstallation, which is not a particularly heavy load.