My husband and just had a discussion about this poll, and we're both of the same mind about it.
We wouldn't live in a gated community of foreigners - it's too tempting for the crooks, we'd feel less safe despite the security. We *would* live in a gated community of mostly Dominicans, as he put it "it's a different class of Dominicans" and we'd feel safe. My in-laws live in them, in Las Praderas, so we're familiar with them. We both dismissed the non-gated community.
When we built our house, in the 80s, it was pure campo. Now it's a barrio. 99% of the people who live there have lived there for generations, we're "accepted" because Mr. AE had been going to that beach since he was a boy, and the old lady next door [who just turned 100] was a childhood friend of my mother-in-law. For the most part, the barrio folks look out for one another, and we are included in that. Yes, they steal fruits and vegetables from us from time to time. Our maid and our caretaker are from the same barrio, and we go out of our way to buy things from the barrio [the ferreteria, the colmado, the fruit/veggie guy, topping off the phones, etc.]. When we're not there, they keep an eye on our house. When the dog was poisoned, aside from the distress of losing a part of our family, we were worried someone was targeting the house. Now we have an alarm system.
For us, the danger isn't from the barrio peeps - it's from the hoards who come out to the beach from Santo Domingo and San Cristobal, busloads at a time. Down the road are a Dominican couple we are friends with. They live in SD and come out every weekend to the house. They have a caretaker who lives on the premises, and several dogs. Totally walled. But even though they are Dominican, they are outsiders. The wife goes through maids constantly, I think it's a combo of her personality and the people thinking they're ricos from SD - not good in a barrio. There have been several attempted break-ins of their house.
So, for us, "it depends".