According to
this CNN article, in the US FAA rules require that a cabin crew member stay in the cockpit when one of the pilots go out. I have no idea if Emirates or their governing body has such a policy, but I would imagine that there is a fair bit of commonality in safety rules between countries.
I think flight engineers disappeared with the retirement of 727s, DC10s, L1011s, and early generations of the 747.