Green’s Dictionary of Slang

crap n.2

[Du. krap, cramp or clasp]

[late 18C–mid-19C] the gallows; thus knock down/up for the crap, to sentence to be hanged.

In compounds

crap-merchant (n.) [merchant n.]

[late 18C] (UK Und.) the hangman.