This is a term from early Modern English (the era of Queen Elizabeth the First), not common, yet still used in current use due to its inclusion in a line from Shakespeare's Hamlet:
There's letters seal'd: and my two schoolfellows*, Whom I will trust as I will adders fang'd, They bear the mandate; they must sweep my way, And marshal me to knavery**. Let it work; For 'tis the sport to have the engineer Hoist with his own petard: and 't shall go hard But I will delve one yard below their mines, And blow them at the moon: O, 'tis most sweet, When in one line two crafts directly meet.
Hamlet, Act 3, Scene 4 * Rosencrants and Gildenstern, the two young men assigned by Hamlet's stepfather as escorts to ensure that Hamlet is sent away from Denmark to his (presumed) death at the hands of an English king. The letters are letters of introduction carried by R&G. ** While in transit (offstage), Hamlet covertly alters the letters of introduction to ensure instead the execution of his escorts and subsequently returns to Denmark.
(The "engineer" refers to a military engineer.) Metaphorically, to hoist someone by his own petard is to use an opponents' own statements or positions against that person.
An index to the whole text of Shakespeare's works is available at this external link. You may find these useful since the text of each play is a single large file that can be searched as a whole, rather than being divided into individual acts and scenes.