I suppose there’s different approaches to answer your question.
First: While I certainly hope, Plex won’t fail me… there’s always the route to backup your database. In case your server goes south you’ll still be able to restore it from a backup – including all the metadata.
As for your specific question:
- The metadata is inside your database and can be accessed as such (SQLite).
- You can even use some of the API endpoints of the PMS to lookup metadata and details for the items in your library. There’s little / no official documentation for those though.
- There’s 3rd party options such as Web Tools NG / Export Tools NG to manually trigger a more easily accessible dump of your metadata (and more)