A lot of the M39/42 adapters - even the cheap ones - have a couple of notches cut into them for just this reason.
Have a close look.
You beat me to this observation. With the notches facing outwards (there are only one set of them on one side only) a lens spanner can be used. But the adapter ring can get stuck inside as well as in an “outside” stick. Depends on which is the greater disaster. It certainly will be easier to remove a stuck M39/42 from an outer thread than in inner one.
The user can weigh up which “disaster” can be coped with easier. I might chose that a Z39 (my terminology for a Zenit M39 thread) with a stuck adapter is only the very minor cost of a dedicated M39/42 if it does stick there and the notches can be oriented so that they can be outwards on the opposing device. In fact a couple of drops of super glue on the appropriate threads might even encourage the adapter to remain screwed on to the Z39 lens permanently if that is desired.
Another option would be to cut a second set of notches on the other side of the adapter at right angles to the supplied notches to try and retain some strength. This would give something for a lens spanner to purchase on if the worst came to the worst.
Unfortunately this is “after the fact” advice.
I have had a couple of near misses with these little terrors but have always been able to get them off eventually. Now I make sure that the notches face outwards on my most vulnerable component.
For an “inside-stuck” adapter ring I can only offer the faceplate removal rubber bung. If you select one that would fit fairly easily but close enough inside the offending stuck adapter and then angle it to achieve grip then it should be capable of enough grip to get the little critter moving - usually once they release their grip they are then fairly easy to unwind the rest of the way.
A small strap wrench with a rubber thong is the most effective device on an “outer-stuck” adapter ring. But even the smallest strap wrench that I know is still on the wide-side when asking for a concentrated grip on a very small purchase area.
There should be specialist strap wrenches for camera maintenance use with thin, but strong, soft purchase throngs, but there are none that I know of. Maybe I should try and make one myself. I use these (with rubber straps) regularly for tight threads on lens repair activities. Sometimes even needing two operating in opposing directions. However the throngs are still too wide for some applications - such as stuck filters - but can sometimes be made to work with a bit of jiggling and holding your tongue the right way
The theory of these contraptions is very simple and I am thinking that a version could be made for fine work. Prof Hank might even turn his mind to a 3-D printed version for us
The secret of course is not in the lever itself but in a very narrow, flexible and strong strap thong. The ones I have a strap that is 13mm wide and 4mm thick. The thickness is not a huge issue escept for very small diameter objects. But the width could be reasonably halved for jobs where the operating surface is quite narrow.
A thin strip of “insertion rubber” is probably best material. I might just try my hand at one when I get some spare time.