Shakespeare used the term Hoisted in Hamlet with the line "hoisted on his own petard" and there are many responses already to why he did so, most make a good arguments for the proper use. Foist is defined as to impose an unwelcome or unnecessary person or thing on. Seems to me, that being blown up by your own device would be a somewhat unwelcome event! If a character is working events to bring about the demise of a malefactor, foist just seems most appropriate. What say ye?
hoist by/with (one's) own petard TFD
To be injured, ruined, or defeated by one's own action, device, or plot that was intended to harm another; to have fallen victim to one's own trap or schemes. (Note: "hoist" in this instance is the simple past-tense of the archaic form of the verb, "hoise.") I tried to get my boss fired by planting drugs on him, but I was hoist by my own petard when the police caught me with them beforehand.
SEE: wikidiff.com for a detailed explanation. To hoist is correct for self imposed actions. to foist is better when imposed upon someone or something. And yes, Shakespeare is always right!