At the same time, the idea that "ability to handle stress" isn't important for software engineering seems (to me) a silly one.
So yes, if you're trying to assess technical ability and you're failing at that, it's a problem. But it is not discriminatory (in the bad way) to weed out candidates who can't handle stress in an occupation that can be very stressful. Though it was pointed out in the article that "public" vs "private" settings made a difference, so your hiring process should reflect whichever of those settings is more likely to come up if the candidate is actually hired.
At the end of the day, the goal of an interview should be to assess whether or not that person will be able to do their job, so you want interview conditions to match working conditions as much as possible. Unfortunately every job is different so there is no one-size-fits-all solution.