We did a 1-day layover in '93 and I was nervous given others' bad experiences (one "adventure" travel agent even said he was telling people to avoid Egypt, this was right after terrorist acts killed several tourists). However, we hired a reputable cab driver for 24 hours, saw most of the sights in Cairo, stayed at a nice hotel, and had no problems. There were some high end pitches (mostly to buy the Papyrus art things). I suspect that paying extra for a good cabbie and hotel provides a kind of "protection"? We're going there again this summer for 8 hr layover, will try the same system. I have travelled all over (incl. India, Burma, Nepal, China etc in '83), I suppose you "get what you pay for" (on the cheap you generally must face aggressive vendors), however the terrorism on tourists has been random. It was all an adventure in younger days, now the $100/night hotel and concierge service/big tip seems a better route. See also:
https://en.wikipedia.org/wiki/Terrorism_and_tourism_in_Egypt