In late May we deployed six sticky traps in and around the onion bed, attempting to reduce the number of Onion Fly maggots. By mid-June the sheets were covered with the shredded leaves Mary uses to mulch the onions, but half a dozen flies were out of action:

We’re pretty sure that’s what these things are:

They’re supposed to have red eyes, but being affixed to a sheet of snot for a few weeks doesn’t do the least bit of good for your eyes.
We replaced the sheets and left them in place until the end of July:

The sheets took another half-dozen flies out of circulation, Mary began harvesting the onions, and observed it was the healthiest onion harvest she’s ever had.
We declared victory, removed the traps, and the remaining onions suffered considerable maggot damage over the next few weeks.
Anecdotally, it seems reducing the Onion Fly population by (what seems to be) a small amount and maintaining pressure on the population dramatically reduces the number of maggots available to damage the onion crop. At least for a single bed in a non-commercial setting.
The plural of anecdote is not anecdata, but we’ll try it again next year, leave the traps in place while the onions are in the ground, and see what happens.
You lack of optical-target-tracking servo-guided pulsed lasers disturbs me.
Sometimes I feel so inadequate …
We were surprised how nicely the enclosures worked: the sticky paper stayed sticky through rain and sun, the wire mesh filtered out the bigger critters, and pulling a few flies out of the air seemed effective.