Certain toxic agents can cause pneumothorax either directly or indirectly. For instance, inhalation of harmful substances like chlorine gas or ammonia can damage the lung tissue, leading to the formation of air pockets that may rupture into the pleural space. Additionally, some chemical exposures can induce severe coughing or vomiting, increasing intrathoracic pressure and potentially causing a pneumothorax.