If you're taking a shaving device of any sort on your backpacking trip, you've missed a core lesson of the ultra light dudes.
Surely the hunting knife you use to kill your dinner when combined with the mirror you use for starting your forraged twig fires, that would be the ultimate solution.
...or just not shave for a few days. I guess you could do that too.
It's a trade off but I think it makes perfect sense after a few nights of not-sleeping directly on the ground under a miniture dyneema tarp.