I’d favor a chemical compound that reacts with urine to form a toxic cloud in the elevator cab.
If the resultant cloud was highly corrosive, the elevator could open... empty.
Problem solved!