With regards to the Jersey incident, the silverback (Jambo) was doing his job, inspecting an intruder to establish whether or not it was threat to his troop. His favourite female, Nandi, also approached the motionless child but was shouldered out the way by Jambo. As already mentioned on this thread, when the child came to and started crying, this seemed to stress Jambo and he decided the best course of action was to retreat to the night dens, followed swiftly by his family. It's unclear whether or not Harambe would have chosen the same course of action, especially since he was agitated by the screaming crowd. Apparently the incident occured after a shift change, leaving only one staff member on the primates section. Maybe if there had been a full staff, there would have been one with a greater rapport with Harambe to call him inside, like they were able to with the females. This is probably unlikely however as the stronger instinct of the silverback would have been to protect his family.
There's only so much the zoo can do to protect people. A busy street or a railway line is of greater danger statisitcally to an unsupervised child, but we don't baracade these up. Parents need to supervise children in their care to a point, like they've managed to do for the 38 years that preceded this incident.