One technique to remove a screw with a damaged head is to place a rubber band on top of the screw and place your drill on top of the rubber band and turn.
Another option is to use 200mm combination pliers. Grab the head of the screw and use it to turn the head until it is halfway out. Once there is enough to hold on to, you can then remove the rest of the screw by hand.
A third option is to use Sutton Tools No. 2 Easy Out Screw Extractor Set.
Another option is a Trojan 250mm nail puller.
It often happens that the drill fastening bits we use get rounded and provide no grip or sometimes destroys the head of the screw. I suggest using hardened fastening bits. They last longer than ordinary ones. - EricL
If paint is not allowing the driver bit to grip properly you could try scraping out the paint in the head or put a screwdriver in the screw and give the handle a firm tap with a hammer to break the paint.
If the screw heads are stripped out completely, then you might need to drill them out with a drill bit. You can drill through the damaged head and the shaft with a cobalt drill bit at a low speed to ensure it doesn’t overheat. Use a cobalt drill bit instead of a standard high-speed steel bit, as it will drill through the screw with less resistance. To fill the remaining hole you can secure a timber dowel in place with PVA glue or use timber putty. Make sure to wear safety eyewear whilst drilling out the screw. - MitchellMc
Sometimes I use an abrasive cutting wheel on a Dremel-like device and cut a slit for a slotted screwdriver. - Noyade
Have you given them a good blast of WD-40? If they’re not budging but still intact you could also try to drive them further into the timber before then retrying to remove them. Might help dislodge any rust/grime that could be the reason they won't move.
As for the busted ones, some gentle persuasion with a hammer should do the trick – use an offcut of timber to protect the timber you are restoring and remove all other screws first. Once you have the pointy end free, a hammer should be able to knock it back out the way it went in. – tom_builds