First of all, please permit me a brief personal comment. I had to chuckle reading your background. I, too, changed from pre-med to engineering and today am an electronics engineer. For years, I also had only the two year degree. I started post-college driving a truck for a welding supply company, and to this day can roll cylinders with the best of them. Now I put new computers on older cutting machine. Plasma and flame-cut mostly. Gasses are a big part of my life.
Okay, the botched execution: I think they might have erred in not getting the CO2 out of his system properly. If the CO2 is allowed to stay and mix with the new nitrogen, it triggers the body to respond. Not knowing anything different, I'd bet the CO2 stayed in his mask and wasn't vented out properly. Just an opinion, but it is the only thing that makes sense. You are right. Had they done it correctly, he should have died peacefully.