Thank you for the realness. I feel like some people dont really tell exactly how it will be on the road sometimes.
Because its not easy to do so. some people have that look you know, the "im a target look" and some have that scary look that makes them stay safer than others. Some flash their fancy iphones in the wrong places and get robbed, some people dont even have fancy phones, so even if someone tries to rob them, they have nothing to loose.
Its difficult to put it simple. In my case, I try to look like im not rich as to be a target but not as threatening that nobody would pick me up while hitchhiking (a balance that is difficult to explain). I usually travel without money, or with so little that if someone wants it by force (knife or gun) I will gladly give it away with no tears. Also, I dont carry expensive and fancy gear or anything of the sort except my photo equipment, which although looks nice and I have feelings for it, It can be all replaced for a couple bucks (its all analog and from the 70's).
In simple words, the less you have to loose the safer you will feel. I could bring with me my canon 5d Mark II and all its prime lenses and make some amazing digital photos that I can edit on my laptop while traveling, but then I'll have to stick with the unconfortable feeling that im a target everytime I flash it out. Or that I might not be able to make pictures in the, ironically, most interesting places to do pictures. Or even worst, that feeling will keep me out of interesting places because of the fear of loosing my stuff. So as a general rule, I dont carry expensive fancy stuff, and as a plus, I stay super light as well.
On the being safe in towns, that's a difficult one. It all depends on your ability to hide properly if you feel that the city is very threatening. I would suggest that once you are entering town, look for a safe spot to hide your backpack (the less humans around the better, specially if its totally out of town), have a small pack or bag to keep the essentials and go to town with nothing to loose. There you can crash in the sidewalk if you want, without having to sleep with an eye open for your backpack. There are other tricks, but I'll let that to your imagination. Just think how big a city is and how impossible is to think that there are no hideouts were you can crawl/climb/sneak/break and enter/etc to sleep for the night. It is one of the most interesting games to play while traveling in my opinion, towns are boring, so instead of making selfies at monuments and shit I love to go around looking for the place to crash when its sleepy time.
But all in all, now that I read what I wrote, I have to say that its all about your attitude. Coming from a place were people will slice you for your old shoes, I have learned that your attitude plays a big role in being mugged. If you keep a straight posture and learn to fix your sight while walking in sketchy places, you will increase your chances of being safe. People who rob people are affraid as well, so they look for easy targets, they wouldnt go for someone who looks confident were it shouldnt, because that sounds like trouble, so they wait for the next shaky person who cant fix his sight anywhere else but the floor.
Good luck in staying safe!