Holy necro-thread, Batman!
... well, it's only been 7 months. And this was my own thread originally, too.
Anyway, thought I'd post a new idea I had in here that would probably allow for this, because said idea is so amazingly dwarfy.
Step 1: dig out the trench and build doors in it on every second tile as in the original post. Fill the first tile with magma. Make sure all doors but the first are tightly closed (do you see where I'm going with this?!).
Step 2: pit a kitten in the open space between the first 2 doors
Step 3: PROFIT!!!
Horribly, horribly cruel outside of a DF context, but again, so amazingly dwarfy: the kitten/puppy/<insert flammable creature here> will path the only way it can, through the door holding back the magma. You can use captured goblin prisoners too, I guess? The magma should incinerate both the kitten and the magma, then you can fill up the trench a bit more with your magma-dumping minecarts or whatever, make the next door pet-passable, pit another pet, and so on. As a safety precaution, you probably don't want to have ramps out of the trench, or you might get a !!kitten!! running about and creating !!dwarves!!, if it doesn't die instantly. Of course, if you use creatures (modded or caught) that are not flammable and
BONUS: It's not possible to pit creatures that are already somebody's pet, but it IS possible to pasture them in.
BONUS2: I din't even need to change the thread title.
I need to test this.
edit: tested this.
result 1: adopted pets do not seem to be pittable. Edited the above for this.
result 2: the cat I'm using for the test is indeed stuck between a door and locked in from above at the end of my test trench by a floor hatch.
result 3: after letting the game run for 20 seconds or so at fps in the 40s, the ☼acacia door☼ blocking the magma is still unharmed (note that I had actually forgotten temperature off the first time round, but confirmed this later).
result 4: the cats I pitted do not seem to want to path through the door, not even if I make it fully allowed
Well, the results were disappointing so far. On to a 2nd test: what if the cats will only path through the door if it's their only way out?
result 5: thought about the possibility of pre-pitting all animals in before opening any doors. Realized that they could just be pastured in before the doors are shut, thus allowing disposal of pets in addition to generic stay animals.
result 6: Pastured cat in a 1x1 room with the only way out or even move in any direction being through a magma-releasing door. Setting door options to forbid passage/keep tightly closed not apparently necessary, cat is content in pasture.
result 7: SUCCESS! Once the door was set to pet-passable and passable, the cat traveled through it, opening it and letting magma through. Both the door and cat burned after a short while.
Final notes: I should note that I ended up being somewhat undwarfy (no burned cats or danger to dwarves) initially due to forgetting to check that temperature was on. Test 2 was done with temperature on. The method works, to an extent, even if it isn't quite as carefree as I'd hoped. Or maybe I was just impatient about the cats pathing through the door when it wasn't actually an escape route.
edit2: So, I changed the thread title slightly, thought I'd note it in this last post instead of making a new post purely about that. I'll probably do at least one more post showing the layout I actually used for test 2, and some ideas for other options, since that layout isn't that ideal for my original idea. Mostly because it's not a straight line and thus doesn't satisfy my aesthetic requirements for fortress design.