This play about capital punishment is more topical than some might care to admit, says Dominic Cavendish