For Phillips screws whose screwdriver slots are stripped, try this.
Make a thick paste, about the consistency of toothpaste, using scouring powder (like Comet). (I shake some into the palm of my hand and spit into it). Fill the stripped screw head with the paste, then insert your screwdriver and remove the screw.
The diatoms of the scouring powder increase the surface area of contact between the driver and the screw to the point where they seem almost bonded together.
My guess is this method would work with sockets and hex nuts, too. Or with hex keys.