hope this isn't too late. Will post for future reference.
Cape Town and even South Africa isn't as bad as some people imagine it to be. Just don't be foolish!
Leave your romanticised ideas about Africa and the natives at home!!
Stay away from townships and other dodgy areas. Be sensible, don't drive dangerous routes alone or at night. Don't leave house doors open or unlocked. Don't leave items lying in cars. Most of the crime people like you will experience in Cape Town will be petty crime like theft.
Power outs or load shedding as it is known locally is usually done according to a schedule so planning can be made in advance. Whether the complex has power generators is something that can only be confirmed by the individual complex. Usually they don't, but the fencing can run on a battery for a limited time. Don't be fooled into a false sense of security by electrical fencing though, criminals can easily by pass these in any event.
South Africa has an active gun culture, although government is trying very hard to make life as hard as possible for law abiding gun owners while criminals run rampant with automatic weapons. Everyone wonders what the governments agendas is. Many people do every day carry, although the firearm should always be concealed!! If you don't conceal your firearm you run a very high risk of becoming another statistic. You will have to comply with South African laws regarding citizenship/residency before a licence can be obtained, a painful process in itself.
All in all Cape Town is a great place, so is South Africa despite the political turmoil its going through. As long as you are sensible you should be more than fine!