This seems to be common. I know I have the same problem. I think any pump that uses a rubber cylinder with a hole in it, and compresses that to lock on will have the same problem.
The only real solution is one of the screw-on heads. They're annoying in their own way - screwing them on is tedious. They're also regarded as a high-end option, so you'll pay more for a pump with one. Or less if you go for the old-style frame pump with hose style, which also suck (the hose holds air that doesn't go into the tyre, making it harder to pump your tyre up). Don't be tempted to switch to schrader valves, they have much the same problem.
The best I've found is to adjust the pump/head properly. Most of them have an adjustment for how compressed the rubber cylinder starts out, which affects how compressed it gets. The ideal is obviously that it's loose enough to slide on and off easily, but when compressed is tight enough not to leak. Play with it.
I find that on my "topeak road morph" on-bike pump I have to overtighten the head when I'm not using the pump or the adjustment barrel comes loose and falls off (luckily, into my pannier). But to use it I back that barrel off a turn or so, then pump up my tyre. In theory I could release the compression lever then undo that barrel a little to get the pump off, but it's hard to get at the barrel when it's on a valve.
For my floor pump it's easier - I just applied a bit of thread locking glue, adjusted it properly and left it. Once someone used it, tightened the barrel right up then complained that it was hard to get it off the valve. I have a useful facial expression for situations like that, combining disbelief and irritation.
But even the best adjustment doesn't seem to work especially well. I think as you pump the hot air heats the mechanism, the rubber softens and expands slightly, and it glues itself to the valve. But even the expensive pumps use a similar rubber, so I suspect it's a compromise between effective sealing and longevity. FWIW, I'm aware that the soft plastic used is not really rubber.
Actual safety tips for doing what you're doing now without losing skin... move the valve to the top of the wheel, pull down and use your other hand as a pad over whatever you're going to hit.