I also lived in Cairo - for three years. Slightly earlier than Bruno. His description of his time there is pretty close to my own experiences and observations. However, Ale4co's question regarding gay dating apps being used to target users is an important reminder to be vigilant when using apps. I met a young Egyptian guy on gaydar and once he trusted me (took several weeks of chatting) we finally met in a large public café (his request) where he described at length the trauma of being entrapped by what he insisted was a European tourist who himself had been entrapped by local police. The police attempted to recruit him into the posse of men that were used to set up these types of honey traps. He refused, paid a fine and then was let go. We became friends and used to chat regularly but he was too traumatized to go any further. (He ended up getting a scholarship to a UK uni and has lived in London for years). At the time, I was not able to work out how widespread this practice was but assumed it was used to extort money from Egyptians by certain members/cells in the Cairo police force rather then being an organized campaign to clamp down on 'homosexual' activity. No idea if this still happens.
As Bruno suggests, much of the M2M activity is based around pleasure and not really related to identity as such. Generally, sexual categories like gay, bisexual etc are understood as artefacts of (primarily) western cultures. Though at the same time, thanks to the social mediatization/globalization of 'gay identity' I did meet several guys who did indeed 'identify' as gay. Interestingly, for two guys I knew, this identification was refracted through an active/passive, masculine/feminine lens - to be 'gay' was to be passive and feminine - a widespread understanding across the MENA region. On the other hand, I knew a couple of guys who did not relate to this at all. For them, being gay was not just about sexual desire but also aligned to ideas about 'freedom' i.e. from the norms/expectations of family, friends and communities. They could not wait to flee from Egypt and leave behind what they saw as the strictures imposed by an Arabic-Islamic culture(s) that inhibited/repressed their sense of 'self'. At the same time, I also met during my three years, a couple of guys who seemed to have, from my perspective, integrated their beliefs and (so-called) traditional values with their other nocturnal homosocial/homosexual . I ended up living across the Middle East for many years (until COVID hit) and speaking generally, in my experience, this 'integrated' approach seemed to be the norm - particularly in the Gulf states (Saudi especially!).