"Invasion of the City Builders"
Kirk and his men discover a world where machines build and re-build without direction.
They are told by the alien race that live there, how they built machines to do away with the need for construction labors, but are now enslaved by the never-ending construction.
"The Bridge to Catastrophe"
Working with the leader of this alien race, Kirk and Spock formulate a plan to stop and maybe even destroy the machinery.