Children tend to follow their parents from place to place, so use that to your advantage. Namely, create an "adult only" passage way. I use such a passage way to restrict access to my silk collection room to adults only (one time in the past a weaver's child kept following her into the room full of stacks of uncollected webs. Damn child kept stumbling into a stack of webs, got caught, and in the process of escaping destroyed the stack. Then of course, immediately stumbled into another stack of webs.) Well, in any case, here's my "adult only" passage way. I'm sure you can figure out how you can use it to create a "roach motel" for children......
####^#### Pressure plate set to citizen trigger, 40000 min weight. Unlimited max weight. Linked to door.
####^#### Pressure plate set to citizen trigger, 10000 min weight. Unlimited max weight. Linked to hatch cover.
###ś#### Just a door and a hatch cover. The level below this has an open space under the hatch cover so that the tile is impassable
when the hatch cover is open.
Unfortunately, had to use the two pressure plate's since you can't set a single pressure plate to be triggerable by a child only while allowing an adult to not trigger it (can't set the max weight low enough to allow for a child while excluding an adult). Method of operation.
Dwarf walks from north to south seeing a pathable route over the hatch cover. When an adult steps on the northern pressure plate, the door will open and remain open for 100 ticks. However, a child is too light to trigger the pressure plate, so the door stays closed.
As the dwarf continues south, it steps on the 2nd pressure plate, opening the hatch cover. If the door is open (from previous pressure plate), the dwarf immediately changes its route and does a side step into the door and continues south. However, a child won't have the open door, so its route is blocked.
You could easily make a frequently visited room with "adult only" exits and eventually, all the children will be trapped in that room. The room could also have a few lever controlled exits to allow the children to path out of the room into a more ... permanent ... storage facility.
NOTE: In order for this method to work, you must have the dfhack patch that fixes the growth of fortress born creatures. Otherwise even adult dwarves will be too light to trigger the pressure plate that opens the door.