But that's wildly impractical. Hence the existence of the EPA, which is tasked with managing pollution, and using central planning to balance the benefits of productive activity against the harms of pollution.
The EPA's purpose is to determine how much pollution is allowed.
During the immediate period prior to the EPA, it wasn't so much it was legal, but the courts began to ignore property rights due to the pressures of what was believed to be common good to let industries thrive.
In some cases property rights are much stricter and can be better enforced, in other cases they are more difficult in areas such as air pollution.
By "immediate period" you mean a couple of hundred years before 1970. English courts started ignoring property rights (e.g. the right of downstream riparian users to undiminished water quality from upstream activities) in the 1700s or so during the first industrial revolution.
For anyone interested in a deep dive on the matter. A good reference book 'Managing the Environment, Managing Ourselves: A History of American Environmental Policy'
In a libertarian system, you’d simply ban pollution (I.e. ban the externalizations of environmental costs), and then let the market and the courts hash things out. If a company was found dumping pollutants into the water, people would sue them, and the costs of all of that would get properly priced into the company’s products.
But the environmental laws are all about the various ways in which companies are allowed to pollute. Companies can dump poison into rivers, so long as they conform the EPA limits. Those limits are, by design, not set any “correct” level (as above, the “correct” level is zero—forcing the externality to be fully internalized; from an economic efficiency point of view, all environmental externalities must be borne by parties to the transaction, either the company or its customers). Instead, the limits are of a “best effort” nature, and a “how to get there from here” nature. For example, the law requires air polluters to install “the best available control technology” on smoke stacks. What does that mean? Well, that requires continual review and revision.
The EPA doesn’t exist to enforce laws that prevent pollution. It exists to manage all the pollution that the law allows.