'Safe' is a funny word. Imagine ...
Four rock climbiners walk into a bar: Abe, Blake, Chris, and Dave. Dave thinks free solo climbing is 'safe,' but Chris disagrees. Chris thinks free solo climbing is dangerous, but traditional climbing is 'safe'. Blake thinks traditional climbing is dangerous & believes David is a fool for attempting something so stupid as free solo climbing, but Blake believes sport climbing is 'safe'. And then there's Abe. Abe thinks Chris is a fool for attempting traditional climbing & Dave is a madmen for attempting free solo climbing. Abe thinks sport climbing is dangerous, but believes top-rope climbing is 'safe'. Abe, Blake, Chris, and Dave only agree on one thing: they will never scuba dive, its too dangerous!
Point is, 'safety' is really a measure of the relative percieved risk between two activities. A better measure of risk management is 'responsibility.' I have seen responsible divers, and irresponsible divers. I have seen responsible dive teams, and irresponsible dive teams. One advantage of good teamwork is the ability of a dive team to distribute this responsibility among the team members. Of course, this ability to distribute/redistribute responsibilities has helped many teams prevent a diving incident from turning into a diving accident. For example, during a typical team ascent, diver 1 might be responsible for calling decompression stops, diver 2 might be responsible for controling the upline, and diver 3 might be responsible for maintaining team formation. If Diver 2 has an OOG emergency (say the upline wraps around his valve, shutting the regulator off as the team ascends) he can pass the upline to Diver 3, and share gas with Diver 1 as he opens his valve.
But the real key to responsible diving is to use the advatage of good teamwork to AVOID incidents in the first place. With one task per person, this three-diver team has collectively spread the individual tasks of a typical bluewater ascent amongst three brains. With a reduced level of task loading, each diver will posess a higher level of situational awareness than possible should they try to manage all aspects of the ascent alone. This means more situational awareness to spend monitoring their buoyancy control, anticipate changes in the environment, or control equipment. It is very likely that in a dive team with situational awareness to spare, either Diver 1 or Diver 3 would notice the position of the upline around Diver 2's valve, stop the ascent, and resolve the problem .. all without sharing gas.