House traps were once common but are now largely prohibited.
You can only install one if your municipal jurisdication Code Office allows it.
While a house trap "may" prevent sewer gases from leaking into the house, sewer odors can still occur if there is a break in a plumbing vent even with a house trap.
If allowed, a house trap installed on the building drain immediately before it exits the foundation would be an inexpensive first step to solving the odor problem.