Barium is bad for perforated bowel because it can cause peritonitis. Is it bad for a perforated esophagus?

No. Barium is inert in the chest and is used for a contrast esophagram to diagnose a perforated esophagus particularly when the initial study using gastrograffin (which unlike barium will not obscure visualization during endoscopy) is non-diagnostic. 


Source

Townsend: Sabiston Textbook of Surgery, 18th ed

Marx: Rosen's Emergency Medicine, 7th ed