I don't think it's a solder joint problem because once you get it working it continues being okay as long as it's in use. Also, when it fixes itself on turn off, there's a "pop" right before it fully turns off. If I recall, the pop is louder than the more muffled one you usually get on turn off.
I'm pretty certain it happens with all inputs. Either way, the headphones out always works. But it's been a while since I used it, and currently the problem doesn't happen (I opened it up for scratchy pots).
It's not a potentiometer problem. The scratchy pots do randomly decrease each speaker's volume, but you can always get some volume or noise by moving the pots. This doesn't happen when a speaker gets no output at all. By saying it can be fixed by quickly turning the volume up, I didn't mean just the physical slider. I vaguely recall it worked also when the input signal was turned up. Maybe I'm misinterpreting it, but I think the higher voltage may have helped.
I'm guessing the source of the problem is either an electrolytic capacitor (none of them are visibly bad), or the speaker mute mechanism that engages with headphones connected.
zucca: The speakers are part of the boombox, though they are removable. What pictures would be useful? Any specific areas on the boards?
Yes, it's an 80s boombox. Here's a fancier relative from the same manufacturer: