Salt became a bogeyman when people started being so sedentary as a whole, and when air conditioning became a widespread residential phenomenon, in the sixties and seventies. The two aren’t completely unrelated.
Prior to that, salt was a necessity. Try working outside all day with temps in the nineties or higher and high humidity, without salt. You’ll pass out. People still take salt tablets under those conditions.