Recently we've been exploring pmtiles and found its potential in many use cases. We created a tool to serve contour lines ondemand based on terrain-rgb, referencing onthegomap/maplibre-contour and acalcutt/contour-generator. This can be useful in server and react based apps.
Check it out at https://github.com/tracestrack/pmtiles-contour-server and npx @tracestrack@en.osm.town/pmtiles-contour-server