Piezo-electric quarts are crystals used in watches, lighters, etc. to convert elastic energy into electrical charge (and vice versa) by compressing or expanding the spaces between bonds in the molecular structure of the crystals.
Assume a creature has the ability to store and discharge electricity - whether that's by the same means as Earth's electroreceptive fish or by a different method isn't really relevant to the question. To generate this electricity it could use the known method, electrocytes forming ion chains, or the proposed method of flexing/compressing internalized piezo-electric crystals. This I would assume would either be lattices within muscle or individual crystals within specialized cells/organs. Assume also that the mechanics of ingesting/growing these crystals are accounted for (that would be another question entirely).
The problem I have with this is that I'm unsure if this more complicated strategy would yield enough charge to be useful for a defensive zap. The question is, is this a believable mechanism? If so, at what density of crystals would piezo-electric charges be equally efficient as the electrocyte of electric fish?
My concern is that the energy expended in flexing/compressing the crystals to generate charge would be less efficient when compared to chemical-based generation.