I don't know enough about the parser cache to give Daniel good advice on his question:

That's another issue I wanted to raise: Platform Engineeing is working on switching ParserCache to JSON. For that, we have to make sure extensions only put JSON-Serializable data into ParserOutput objects, via setProperty() and setExtensionData(). We are currently trying to figure out how to best do that for TemplateData.

TemplateData already uses JSON serialization, but then compresses the JSON output, to make the data fit into the page_props table. This results in binary data in ParserOutput, which we can't directly put into JSON. There are several solutions under discussion, e.g.: [...(see Daniel's original message for the list of ideas or propose your own)...]

But I see some people hiding in the back who might have some good ideas :)  This is just a bump to invite them to respond.