Humans have been pooping for as long as humans (and their ancestors) have existed.
While it's impossible to pinpoint an exact date, we can look at the fossil record for clues. The oldest known human fecal matter (coprolite) dates back approximately 50,000 years. This particular discovery provides valuable insights into the dietary habits of Neanderthals, suggesting they supplemented their meat-based diets with vegetables.
Keep in mind, hominids existed long before Homo sapiens and Homo neanderthalensis. Any creature with a digestive system produces waste. Therefore, the act of defecation predates Homo sapiens by millions of years, extending back to the earliest forms of life with digestive systems. We're talking potentially billions of years if we consider the earliest organisms with rudimentary digestive processes.
Therefore, while we have concrete evidence of human poop from 50,000 years ago, the act of "pooping" as a biological function extends far, far back into evolutionary history.