Those are very rare cases.
Very rare.
Anesthesiologists are physicians. They are MDs or DOs (Doctor of Osteopathic Medicine) and highly trained in their speciality as much as the surgeons are. They are doctors, with full medical school and training, who chose to specialize in anesthesiology. They will tailor the anesthesia to each patient and are active in monitoring the patients breathing and vitals throughout the surgery.
There's a risk with every surgery, they can't claim otherwise, but you're surgeon is skilled and trained and knows what they are doing, what to look for and how to counter any issues that arise as they happen. Occasionally the effort of the surgeon and team aren't enough, and tragedy does happen. This, however, is rare, especially considering how many surgeries are performed daily throughout the nation.
Same goes for anesthesia. All of it. It's rare.
And your anesthesiologist is trained to monitor and counter any issues that might arise from complications with the anesthesia. The anesthesiologist is a part of the surgical team, and often is the one that has final say. They'll keep an eye on you throughout, adjust levels as need, and most importantly, closely monitor you prior to the start of the surgery to make sure there isn't an adverse reaction to the anesthesia. The surgeon has to wait for the okay from the anesthesiologist in order to begin surgery. Any sign of an adverse reaction at all and you'll be woken up, treated for the reaction if necessary, and closely monitored if immediate treatment isn't necessary. The surgery will be rescheduled and the anesthesiologist will tailor a new anesthesia regiment for your next time.
Again, sometimes despite the skill and response of the the doctors and nurses, tragedy does happen, but you're in excellent and highly skilled hands. By a trained physician. And again it's rare.