sorry if this is too much. i studied insects a fair amount in college, and ants in particular a lot.
regarding this insect being a wingless wasp: I'm not convinced. it's a characteristic of all hymenoptera (ants, wasps and bees alike) to have a bigger segment in the antennae close to the head, and then a chain of much smaller segments. many bees and ants hold them with an angle between the long (called the scape in ants) and the rest (the funiculus in ants), but not all. wasps have less difference in length of segment between scape and funiculus (if that's what the wasp people call them), but the scape segment is almost always (as is the case in all the pictures of Gelis spp. wasps from a search just now) much bigger/wider, or bulged. in your picture I'm seeing all antennal segments of near equal length and width, which immediately screamed 'not hymenoptera' to me....
in fact, that first one looks very like an ant-mimic bug in the order hemiptera. i could believe that the long straight bit just under the head is a few leg segments from the far side of the body, but to me it looks more like a set of piercing mouthparts, folded under. do a google image search for 'Hyalymenus', a fairly widespread genus of ant-mimics. note also that many also have that extra little set of spines on the back as are in your pic.
again, apologies if this was more depth than desired! sometimes i need a lot of words to call them as i see them!