Earlier quoted context omitted.
Bach did not invent equal temperament. He probably had thought of it at some time, but his writings make it clear that he would be against such a concept. He was in favor of a 12-tone temperament, but it wasn't equal. It's not clear, but I generally doubt he invented it, only that he heard it at some point and favored it.
Thank you for the clarification. Music is weird. My understanding was the well-tempered clavichord was one of the oldest deviations (that was written) from the concept of just intonation: you learn something everyday.
You can tell that this wasn't equally tempered because composers talked about the "color" of each key, a concept that doesn't make sense unless the keys sound different.