As others have said, any town or city in any part of the world is going to have what you would consider rich/poor areas (either in absolute terms or relative terms or both!).
In the UK, going back many years I was assaulted (well, that's what the individual was charged and convicted of but I wouldn't have called it anywhere near that), I've also been the victim of fraud (someone successfully got HMRC to provide a refund in my name for a self-assessment tax return I hadn't submitted).
In Spain, we've been burgled once in 8 years - and while I don't want to do any victim blaming, that was due in part to a degree of forgetfulness by myself (due to having had one to many vino!).
I don't feel much difference in terms of my personal safety when wandering around here than I did in the UK or anywhere else in the world really and I'm a frequent traveller. The only place I felt notably safer was when I worked in Switzerland but the price of a pint was also criminal there!
.