Should I install a drain trap on the main pipe before it exits my home?
Soil traps are now banned. I think they were common prior to the 1950s and since your pipe is terracotta that would indicate it predates this time.