I kind of doubt it - they've evolved for thousands, if not millions of years to be able to pound their beak for fairly long periods of time. The ones I've heard, always seem to stop after pecking for several seconds and then start again. I think that allows them to keep going long enough to build a next inside the tree.
If it did hurt them, they would probably just try finding a vacant bird house or build more traditional nests.
If it did hurt them, they would probably just try finding a vacant bird house or build more traditional nests.