If an Apple Pencil is set-aside for an extended period, unused and uncharged, its battery may be irreversibly damaged through deep discharge. In common with all Li-ion batteries, they must always have some level of charge.
The Pencil's tiny internal Li-ion battery is susceptible to permanent damage through being left discharged for long periods. Even some “new” pencils can exhibit signs of failure out-of-the-box if they are “old stock”.
It is essential that if you have an Apple Pencil that you charge it regularly - whether used or not - so as to protect the battery from deep-discharge. Never allow a pencil to remain in low-charge state for any period of time - as the internal battery will fail, rendering the Pencil useless. Setting aside an unused Pencil, for an extended period, is a recipe for premature death of the Pencil battery.
If the Pencil Battery has failed, the only remedy is to replace the Pencil.
Gentle warming of the Pencil (such as placing on a hot water radiator), prior to attempting charging of the Pencil, can sometimes resurrect a dead Pencil battery.