Put it in a function and the scope you pollute is only as big as you make it.
The pipeline transformation specifically lets you clean this up with functions at the scope of each ephemeral intermediate value.
Anyone can write good or bad code. Avoiding new functionality and syntax won’t change that.