Are there any commercially available PLC's that can compile/ download programs through an API?
You can definetely use a PLC for this. Except, you don't want to change the PLC code for each "smoothie recipe".
You should write a PLC application that reads recipes from any source, like sd cards, network storage, internal storage or even QR codes if you're feeling fancy.

Often PLC's already have a feature for this, where a recipe is a set of parameters you can load (and edit with the HMI).


  real-time IO to external devices with minimal processing


Whatever you choose to use, do not invent your own PLC. It's probably not worth the time. And don't think the software or additional module is expensive, you are not able write it for that price.