There are surgical meds that have this effect. They paralyze the
voluntary muscles but don't affect the heart or lungs.

Trouble is, the diaphragm is a skeletal (= "voluntary") muscle that just happens to run on autopilot much of the time.  And as a skeletal muscle, it is affected by the curare-type paralysing agents that are used in surgery.  That is why anaesthetists like Rob are employed to make sure the patient continues breathing and can maintain their airway while the surgeon gets on with doing her job.

Yes, you could in theory use it as a weaponised agent, but you'd want to get the dose exactly right (which is impossible in non-monitored situations) otherwise people are going to be dying ...