They're fucking it up on purpose, the issue they've been having is the mask is a closed loop so there's a build up of CO2 and it ends up more being a nitrogen augmented smothering than death by true nitrogen asphixiation. Its a very basic issue and I think cruelty is the point, either directly or by falsely discrediting an otherwise humane method of execution (not that any execution is good)
Nitrogen asphyxiation should be effective and painless, but not if the person fights it. Which means it'll be hard to use as an execution method (unless you surprise them with it somehow)
You could give them a sedative. They pass out and can't hold their breath, then you administer nitrogen. You could probably even find an acceptable oral medication so you wouldn't require a doctor to administer it. I'm in no way saying this is acceptable, but it isn't that difficult.
Put them in a small sealed room with airflow you control. Using a randomly generated number to pick the start time (within some maximum that's deemed appropriate), you then throttle up the nitrogen and throttle down the oxygen.
The time spent in the room would still be pretty terrifying so I doubt it'd be much better than the mask... Maybe the room is their cell and it's a randomly chosen day within an execution "week" where you make sure they're asleep first?
Probably best just to not kill people of course, but if you're gonna do it, do it the most humane way possible.
I’m amazed they even go to that much trouble, or that condemned have a choice in the matter. Just a single bullet to the back of the head should suffice. No need to get creative or prolong any suffering.
If the state feels like it must kill someone, do it with a quick and effective method. This just feels needlessly cruel.