"he narrowly escaped being a pimp too"

Thomas Middleton
Public DomainThomas Middleton - Credit: Vizetelly & Co
The word pimp first appeared in English in 1607 in a Thomas Middleton play entitled Your Five Gallants.  It is believed to have stemmed from the French, pimper, meaning to dress up elegantly, and pimpant, meaning alluring in dress.

In the 18th and 19th centuries, the term was commonly used to refer to informers – as in the quote above.