Asimov wrote one like this[0], but the theme is pretty common and shows up in many science fiction stories. I only call out Asimov's version because it also has the Machine screwing up orders on purpose to remove otherwise competent people from power who don't trust it.