The syndromes, I think b2-01, and -04 can be combined into one personality changing one, probably decreasing stress vulnerability and anxiety. There might be more but that should help make it seem as if they just don't care what's going on around them. -02 could be one that causes emotions of euphoria etc. And -05 would be identical except it causes unconsciousness in 50% of subjects. -08 could be a combination with both euphoria and causing nausea, fevers, dizziness and possible paralysis (which leads to suffocation). That one should be reserved as an attack I think, with an attack usage hint.
The relevant parts of the world syndrome tags would look like;
01; (facets come from the lower half of this page:
https://dwarffortresswiki.org/index.php/DF2014:Personality_trait[CE_CHANGE_PERSONALITY:FACET:STRESS_VULNERABILITY:-100:ANXIETY_PROPENSITY:-100]
02;
Emotions drawn from:
https://dwarffortresswiki.org/index.php/DF2014:Emotion[CE_FEEL_EMOTION:EMOTION:EUPHORIA:100]
For 05 you could copy and paste the emotion string 3 times (that seems to cause a stronger effect, somehow?) And then add ce_unconsiousness:prob:50:sev:100
And 08 would again be the above + ce_dizziness, ce_fever, ce_nausea and finally ce_paralysis with probability like 80 and 100 severity. That should kill them.
For one that removes intelligence temporarily, you want to target only critters with can_learn and can_speak and then inflict:
CE_REMOVE_TAG:CAN_LEARN:CAN_SPEAK, and then when that timer ends use CE_ADD_TAG:CAN_LEARN:CAN_SPEAK for one tick, thus ensuring it's not permanent.
I can think of one way the candy machine is viable and kinda sorta resembles the described scp's function and doesn't require dfhack, and that is to make the candy maker a creature.
I've done this before for my "wash basin"s; basically the creature is [immobile], made of inorganic materials, has only 1-2 body parts (in this case a candy drum and a music box) for lower body and upper body/head respectively. In this case you would milk the machine first, and then process that into cheese (in this case called cotton candy or something). When dwarves eat the "cotton candy" they get a syndrome which does nothing but give them a permanent syn_class.
Then, the machine uses an interaction that has a greeting or clean_friend usage hint, targeting only that syn-class. Not a material emission, just an interaction that directly imparts the syndrome, like the way the mummy curse does (you can find that in the interaction examples folder). In this case the CDI should not have the line_of_sight flag, so the machine can affect people through walls. Give it several of these, so it can have different effects.
Now the trick is, each of those effects should add a second syn_class, and simultaneously ignore targets with that syndrome class by forbidding it. That way a creature can only have one effect applied at a time. When that syndrome has run it's course it should be targetable by another.