As Joplin CLI has supported sub-folders, all my ideas can be realized using it now.
Recently, I built a Docker image based on Joplin Terminal and packaged an (approximate) plug-and-play Joplin client container specifically designed for accessing the Data API programmatically. I plan to try to integrate it into my blog system in the next months.
If you need to programmatically operate Joplin data in a headless environment (such as a server) too, you may try this image. Any usage issues please let me know.