Since woodpeckers don't eat wood, concentrate on killing the insects that the woodpeckers are actually eating (rather than "keeping the woodpeckers away" by some means other than removing their food source.) Though if the tree is as described, I'd also suggest taking scions to graft to new rootstocks as it may be in serious trouble and at least that way you'd have the same variety grafted onto some healthy rootstock if it just up and dies. Very old apple trees do die, normally. The occasional one that lives to an exceedingly old age is an outlier.
It's not the woodpeckers that are killing your tree - they are just the visible manifestation if the insects that are killing it.
Biennial bearing is a common habit and can be broken with aggressive fruit thinning in "good" years, so the tree is not overtaxed. Otherwise the tree puts on a lot of fruit, expends a lot of energy on the fruit, gets to the next year "exhausted" and puts on little to no fruit. With aggressive thinning, you reduce the load on the tree so it's not so "exhausted" and has some resources to put on fruit again - weather permitting (all my blossoms got froze off last spring - too warm, too early, then cold...)
Please don't put tar on trees. That is a discredited practice, unfortunately wide-spread enough that the idea persists long after it has been proven to be a bad idea. Tar is also known as "wound dressing": Should I seal the wounds where limbs were removed on a crape myrtle?
As for how to control your insects, first, you need to identify them.