Woodpeckers only peck holes when there are bugs. They can hear the bugs inside the wood. Get rid of the bugs and you’ll get rid of the woodpeckers.
Now that opens up a whole different problem. I have seen a log cabin sprayed from top to bottom with pesticide. But in most states now, that’s illegal.
Civil War reenactment is LARPing for people with no imagination.