rekt, Belgium 9 points. I'm sorry USA you're next.
I haven't been to Brazil, but friend of mine who was there last year told me that it is pretty scary place to visit and quite dangerous for white foreigners. There is police, but they won't help you if you don't follow their guidance which includes designated areas where foreigners are allow to move and especially when. He told me that it is forbidden for foreigners to go to downtown of Rio on Sunday and that police won't help them in case they get attacked. He also mentioned that poor people live very close to rich, that they aren't really split but rather placed in heterogeneous way. Which is why mansions of rich white people are hidden behind tall walls and encompassed by barb wire. Sounds like I'm exaggerating but that's what he told me.
I've been to Rio last year I can confirm that compared to everywhere else I've been, the security measures are much more visible. There are quite a lot of mansions with high walls and barbed wire. You can see the inequalities and it's really obvious. However it didn't seem ripe for a social meltdown, at all. Poor people are poor but there are plenty of jobs for the poor. Go to any restaurant and you'll be assaulted by an army of waiters, same thing with pretty much every business. Work is cheap.
There is also a lot of social cohesion. As you said the rich don't really ghettoize much, and I didn't see any ethnic minority ghettos either. About ethnic minorities, Brazil is a strikingly homogeneous mix of every color from white to black.
Finally, for the tree days I've spent there as a tourist, the only thing to keep in mind is "do not go in the favellas" which would be a very dumb thing to do anyway. The closest we got to being robbed was a taxi driver trying to trick us in an amusingly obvious way.