Failure of your Apple Pencil coinciding with an update of your iPad is nothing more than a coincidence.
Gently warming a fully discharged Pencil will often revive a fully depleted battery - such that it can accept sufficient charge for the Pencil to work. Warming, is a short term fix.
If a Pencil has been set-aside for an extended period, unused and uncharged, the Pencil battery can be damaged through deep discharge. In common with all Li-ion batteries, they must always have some level of 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.
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.
Genius Bar Reservation and Apple Support Options - Apple
As for longevity, a properly maintained and cared-for Pencil should provide many years of reliable use. By example, I have two first generation Pencils used with two different iPad Pro 10.5" device. These Pencils are at least 6+ years old - are properly maintained with regular charging - and are still going strong. Similarly, a second generation Pencil used with a more recent iPad, remains without issue after three years of use.