As described, while your battery may appear to be healthy, the reality may be somewhat different for an iPad that has been in use for several years.
What may be occurring is spontaneous shutdown in instances when the iPad's battery is unable to supply sufficient power to meet peak load. The power drawn by the iPad is not constant, but varies as CPU/GPU activity changes as tasks are performed. If the power requirements "spike" beyond the capability of the battery, the terminal voltage may unexpectedly dip - and cause the iPad to perform a controlled shut-down, or crash/restart.
Given your iPad's age, you might be well advised to contact Apple Support and request a remote battery diagnostic test. You can contact the Support Team using the Support link at top-right or bottom-left of this page.
Alternatively, you can initiate and manage your support cases from Apple devices using the excellent Apple Support App. If not already installed, the App can be downloaded from the App Store:
https://apps.apple.com/app/apple-support/id1130498044
You might also visit the Genius Bar at your local Apple Store or Apple Authorised Service Provider (AASP) where the technicians will be able to hands-on test and assess your iPad. Should a battery replacement be needed, you'll be in the best possible place to explore your available options:
Genius Bar Reservation and Apple Support Options - Apple