I'm not familiar with the Figma API JSON, but I have tried many ways to produce PDFs from PHP over the last fifteen years. I have come to the conclusion that it's difficult to perform complex documents. The HTML/CSS support is limited, and it could take a long time to process complex or large documents.
In 2025, the best option is to delegate PDF production to a dedicated service, which is often based on a headless browser. For open source, there is the excellent Gotenberg project.
Otherwise, I found an API called PDFactorix that can generate a PDF from JSON data using a template defined in HTML and Twig to manipulate the data. One interesting function applies the template to each JSON object within a single PDF.