The best thing is to ask people who live in the country. There are a few good post here from people who lives in Mexico everyday. But sure, you could end up at the wrong place at the wrong time just like anywhere you travel. If you go to Alaska, do you ask the people from New York to tell you how it is with the bears? The news will make an horor story on someone that got attacked by a bear and everyone will think bears are very dangerous and think if you see one he will attack you, it will not likely happen.
Cancun was very nice a week ago as I travelled here and there by bus. We where just part of a bunch of people walking around and doing their own things, do not show off, stay out of trouble area and you should be OK.
Italy had many warnings many years ago, I went there with a car and a tent, was aware and did just fine.
Same in New Orleans downtown at night, just got off the main street with the stupid GPS routing me through the short route, not the kind of place you want to be at night, it looks VERY scary with the gangs on the streets, very scary for me anyway, I was at the wrong place in the wrong time I guess. Same in New York Bronx with the camper and trailer, it was a scary moment for my Canadian eyes.
In Spain in the 1980's, there was almost a war going on with the Basque conflict, people where getting bombed in the north, Barcelone roads where closed due to some fighting . We listened to radio, talk to some people at the France / Spain border, waited until the roads opened up and the way we went with the car and a tent. We went to all sort of restaurants and night clubs, no problems. Trouble was only in some specific parts of Spain, everywhere else was pretty quiet and trouble free.
In Moroco in the 1980's we had the Bus shearched by the police or military not sure, armed with big guns, there was still a low intensity war going on in the south, but not everywhere in Moroco.