The moths are probably Douglas-fir tussock moths or other moth and the caterpillars of these moths feed on the soft parts of the tree. This feeding often weakens the tree making it easier for fungi and bark beetles to invade and begin further killing the tree. The woodpecker probably knows the larva is under the tree bark and is looking for a tasty meal. In a sense the woodpecker is helping the tree by eating the caterpillars and larva.
I noticed a similar situation here in NC on one of my trees. The tree looks like it is ringed with holes and damaged bark but it keeps on living and putting out new growth. Its been about 7 years and eventually the tree will die. As long as the falling of the tree is not a hazard to anyone I would let it go naturally.