Here is an article from Wheel Fanatyk in which they discuss Z-bend spokes and then try to find a modern available tool that is up to the challenge of creating Z-bends in spokes.
Wheel fanatyk article link
The tool they found to work is the Great Planes Precision Z-Bend Pliers, originally made to put Z-bends in model airplane control rods. WF used to sell the tool but no longer does. Luckily,
it is still available on Amazon.
Could just carry one of these pliers around, along with a few extra long spoke "blanks" with the possibility of buying more if you ran out, but as others have mentioned it doesn't fix the problem you have if you can't get the old broken spoke head out of the hub.