What is the ideal topology for a shoulder joint?
The key with shoulder topology is to represent the deltoid muscle well and to separate the arm mesh from the body. The exact topology will depend on your subject. Most of the time every model will have slightly different topology.

For example, a muscular male will need far more dense and defined topology than a slim female.

The general rule of thumb with topology is to follow the muscle flow. Here is a front, side,, back, and top view of a fairly typical shoulder topology layout.

Things to notice:


The vertical face loop roughly follows the inside and top edge of the deltoid, on both front and back. 
The horizontal loop is placed roughly where the deltoid, bicep, and triceps meet.