While I am a strong supporter and believer in this type of tech development (in fact, I am majoring in Biotechnology), I think there is a very fundamental problem researchers face in replacing natural biological function with the artificial. Evolution has driven our biology to near perfection and absolute insane complexity. If you don't believe me, take a look at a few of the biochemical pathways discovered in the past decade. Designing a machine from the top-down to function in human biology is pretty much out of the question at this time; after all, how can we compete with billions of years of evolutionary development? Instead, we must first gain a fuller understanding of biology from the bottom-up (i.e.-protein binding and folding, enzyme functions, signaling pathways, biomolecule synthesis, etc..). While we might be able to engineer per your example a molecular nano-machine which functions in the intestines, we could not ignore the fact that the incredibly complex ecosystem inside of us is driven by the evolution and adaptation of said organisms. We have an entire organ (the appendix) devoted to ware-housing our bodies natural organisms; a type of biological seed bank in case of foreign invasion by other species. To put this in some sort of perspective, engineering a nano-molecular replacement for intestinal bacteria would be like trying to eliminate an entire species from the forest and replacing it with a machine that fills the same function and niche as the animal did. There are many, many complex interactions that would need to be fulfilled by such a device. I am optimistic, though, considering the outstanding research done recently in this field. There are great prospects on the horizon for molecular machinery. We may soon be in the position to develop devices that, for instance, would have the ability to detect (in real-time) internal glucose/hormone levels in diabetics and release insulin into the system based on these levels. The possibilities of genetic and molecular engineering are nearly endless, but we must first gain a fuller understanding of own biology as well as the fundamentals of engineering on the nano-scale.