Obviously.
> Like in this case.
I think the contention is that an ESTA is not a suitable visa for this sort of activity. How is what you're saying disproving that?
> What's wrong with foreigners, legally, with visums issued, building factories that then employ locals?
Nothing.
This statement is just completely disconnected from the reality of the diversity of the American work force.
Even under ESTA, you can do some such activities - call'em "job" - in the US. On behalf of your non-US employer.
The devil may be in the details, but the assertion these workers were "likely" (or even just "potentially) doing a _US job_ (subject to a Visum qualifying for _US employment_) is definitely misplaced.
Generally trying to get the right papers for something is trying to put the closest shaped peg into the oddly shaped hole.
Having once organized a small team across european borders during Covid, I've learned that it's actually pretty tricky to get papers that 100% correctly match what you need on the ground. Usually there's a bit of give and take needed on all sides to make the world turn.
In this case that process clearly broke down.