A setting I've been planning for a while involves a function of magic that can animate objects using the magical equivalent of programmable functions. A wizard/witch/magic-user uses a magic language to define the shape of an object, then adds programs to make it move, and then strings together an array of if-then-else functions to make it perform those motions when specific conditions are met.
Anyhow, I've been having some issues keeping this brand of golem from being taking over every aspect of this setting since they are mind-bogingly useful. They're basically robots that require practically no material cost to make, just the time a magic-user needs to write out all their programs. They should really change the all aspects of society, so much so that I can't include them in a story without making the story all about them.
I need to balance these guys so that they are only used in specific circumstances. At the moment, I'm using golems to justify MASSIVE buildings and infrastructure in the medieval setting, have golems moving cargo in cities (garbage and trade goods, mostly), and golems being used by farmers to grow and harvest lots of crops for cheap. In short, I'd like for golems to be used like we use heavy machinery, but dial back their use throughout the rest of the setting.
How can I make these golems useful, but not omnipresent in this setting?
So far, the only idea I've had is making the magic animating these golems require habitual maintenance from magic-programmers in order to keep them from freezing up or moving incorrectly (which results in them falling over and/or breaking something). Checking for degradation and repairing their programs every few weeks is sufficient to keep them working. This would keep them from being totally autonomous, which seems like a step in the right direction.
I also got magic working like wi-fi in this setting, so fuel isn't really an option here. You just got to built a new conducting tower and connect the golems to the magic/power grid to get them moving. This limits their range, but it seems like a really minor flaw that doesn't lessen the use golems much.
Ideas for more flaws or criticism of the basic concept would be greatly appreciated.