Egypt’s recent outreach comes as countries across the region try to contain the fallout from the war, with Gulf states under attack and leaders trying to avoid a wider conflict.