Found in 1 comment on Hacker News
Tangurena2 · 2023-10-09 · Original thread
You are thinking of the (now non-canon) book Tales of the Bounty Hunters. IG-88's story "Therefore I Am: The Tale of IG-88" has this as part of its plot. There were 3 different IG-88s, one of which took over droid production on Mechis 3 (the main droid production planet in the Empire), embedding something like "Order 66" in every droid produced. After relocating itself into the computer core of this fully operational battle station, it was about to transmit the code to start the droid revolution but was destroyed by pesky rebels.

One of the things that emphasize the horror of enslaving all those droids would be the repair manual of the Millennium Falcon[1] with 3 separate droid brains imprisoned inside it. One of whom, L3-37 was a droid liberationist herself[2].

0 - https://starwars.fandom.com/wiki/Tales_of_the_Bounty_Hunters

1 - https://www.amazon.com/Star-Wars-Millennium-Falcon-Workshop/...

2 - https://starwars.fandom.com/wiki/L3-37

Fresh book recommendations delivered straight to your inbox every Thursday.