Interesting response. There are gyms all around the world which, in reality, do much better for longevity than just walking. Not sure where you read that daily walks are a requirement for survival either - how do those handicapped in wheelchairs survive? Many Americans live off of fast food and Netflix with zero walks and still live into their 70s. I digress...Human beings need to walk outdoors on a daily basis in order not to fall apart.
It is not optional.
I would say a better advice would be to choose your neighborhood very carefully. Some of them have security 24/7 at every corner. As a foreigner you should be able to afford that.
Since you took my point quite literally, the more specific point is walking alone - whether in the US or other areas - has inherent risks. Could be a mountain lion in the woods or a criminal in the streets. The key is being smart, as I mentioned. I'd rather pay 100 pesos for a ride than risk a mugging but really depends on the area, time of day, etc.
I agree with your point about the neighborhood. However even in Condesa/CDMX, one of the pricier areas in CDMX, I'd hear about police harassing gringos and other crime too. 24/7 security is helpful after the fact, but not during the mugging - CDMX has security cameras on many streets yet the crime rate is high and the police are corrupted to the core. I'm a huge walker but a DiDi is often just less hassle. I can 'not fall apart' in the gym or taking a group hike to a nearby national park.