Dogs, regardless of size are safe to coexist with humans provided they are treated appropriately from a sustenance and behavior/training perspective. That's the result of traits associated with being an animal living in a pack social structure, along with thousands of years of breeding. When dog behavior crosses a line, the dog is euthanized.
> You wouldn't lock up a human either for having the capacity to harm someone else.
We do. When humans demonstrate a lack of control that puts others at risk, we apply progressive discipline to discourage future misbehavior. Fines, probation in various flavors, jail, and finally prison. If you steal a phone from an unlocked car, it's usually misdemeanor theft, if you break down my door to steal a phone, it's a felony burglary.
> So if you end up with an orphaned gorilla in your care, morally you are between a rock and a hard place.
It is really a ranking of priorities. I'm not an ethicist, but generally speaking, the preservation of human life is usually a primary moral imperative.