Overheating would almost certainly be as bad or worse on an energy weapon, since at least a bullet-gun gets to eject the hot gasses, but many of the energy weapons don't eject anything so can only cool by radiation, and the energy levels involved are a lot higher.
Quite possible! Although we don't have any actual plasma gun designs to work this out with.. Then again, presuming handgun-sized object can deal with the waste heat in atmosphere, it has to have pretty hardcore thermal management to start with. You'd probably need some kind of bolt on cooling array.
I don't think Heckler & Koch have certified their automatics as vacuum rated yet, who knows, maybe when Space Force puts out a tender for an astronaut sidearm.