Last point first - other than the user-replaceable pencil tip, this being a "consumable" part that must be routinely changed when inevitable wear becomes apparent, the Pencil has no serviceable parts. A defective Pencil can only be replaced, not repaired.
Your Apple Pencil is exhibiting symptoms of a failing/failed battery - that will not reliably accept or hold any charge.
The tiny internal Li-ion battery is susceptible to permanent/irreversible 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. Do not 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 extended periods, is a recipe for premature death of the Pencil battery.
It is generally recommended that a second generation Apple Pencil is always docked with the host iPad whenever the Pencil is not being actively used - as this will optimally charge the Pencil battery and protect it from potential failure through deep-discharge. Be aware that unless the Pencil remains completely motionless, when the Pencil will "sleep" in a low-power state, the Pencil electronics and Bluetooth radio will remain active - and will discharge the Pencil battery within hours. In the sleep/standby state, maintained in a totally motionless state, the battery should retain some level of charge for a week or more - any movement increasing battery consumption as the Pencil is re-awakened.
If the Pencil Battery has failed, the only remedy is to replace the Pencil. If the battery has failed and your pencil is within its one-year warranty, you should look to having it replaced by your retailer or at an Apple Store.
You would be best advised to visit the Genius Bar at your local Apple Store or Apple Authorised Service Provider (AASP) - where the technicians will be able to test and assess your iPad and Pencil. If a fault is identified, you’ll be in the best possible place to explore your available options:
Genius Bar Reservation and Apple Support Options - Apple