Funny you should ask! Yes, it can be done. I've built something like this recently...my goal was to make programmatic videos of chat conversations. Here's an example[0]. This was rendered totally headless (no launching blender UI) and the input file was a json document that was generated programmatically. I'm in the process of containerizing it so it can be run serverless in the cloud, driven by a job queue.