If you want every player at every point in your map that is standing inside an iron_bar to die instantly, you should be able to do this:
/execute @a ~ ~ ~ detect ~ ~ ~ iron_bars * /kill @a[c=1]
(add this command as well if you want them to die if only their head is inside iron bars:
/execute @a ~ ~ ~ detect ~ ~1 ~ iron_bars * /kill @a[c=1]
)
If you want it to be in specific places, you could do things like
/kill @a[x=X,y=Y,z=Z,dx=DX,dy=DY,dz=DZ]
use the delta values to define a cuboid area. you'd have to repeat this command for every area you want to define.
the other possibility to do this would be to summon an entity in those places and execute off of those.
you mentioned this above already, and let me make a few things clear: many entities (mobs) can be give the {PersistenceRequired:1}
tag to make sure they don't despawn, except a player kills them.
The best way to mark an area are "area_effect_clouds", which don't render in spectator mode and can't be interacted with by the player (no killing, no pushing, nothing). the only downside (which you can work around however) is the fact that they do despawn on their own if a certain criteria (their Age
tag is greater than their Duration
tag) is met. this can be worked around by either setting the Duration to a very high number ({Duration: 2147483647}
will make the AEC last for over 3 years realtime) or resetting the age tag using /entitydata @e[type=area_effect_cloud,<more selector parameters> {Age:0}
occasionally.
Now that we have that out of the way, you are then able to execute off of those entities like so
/execute @e[type=area_effect_cloud] ~ ~ ~ /kill @a[r=1]
or even execute particles off of them
/execute @e[type=area_effect_cloud] ~ ~ ~ /particles <...>