To be foiled by your own advantage(i.e., explosives prematurely explode).
The history of the phrase comes from the uses of a petard in a siege (a petard is a volatile early explosive capable of bringing down castle walls).
To be hoisted is to be lifted or sent up, which is generally what would happen to you if you were near a petard when it goes off (and that’s if you got off lucky).
So, you don’t know for sure that Pastis doesn’t get some of those tax revenue dimes?