Don't do that. It is illegal in most civilized places for good reason.
It isn't safe for your ground water if you have a well or for your crops if they are grown nearby. The minimal distance can be anything from 100 feet to 1,000 feet depending on how the water flows underground in that area. However, the longer it is there and the more that gets added nullifies any distance.
One consolation is that with oxygen come microbes that can break down the hydrocarbon-based pollutants into less problematic constituents. Surface-spread oil gets eaten faster than buried oils by a factor of days and month versus literal decades, respectively. However, they can not do anything for heavy metals. Yes, you are putting heavy metals, of several types, right into the ground. Yes, it is a terribly massive problem for everyone and everything nearby.