This reminds me of the computational biology and molecular computing done by Luca Cardelli over the past decade or two. His most recent paper in this direction was A Language for Modeling and Optimizing Experimental Biological Protocols
. I never understood the pursuit compared to his other work, but it’s just so darn interesting.
The introduction on this page is fairly opaque. Look up “active networking” for the broader field which this is one example of.