Even on passports that require visa ahead of time (not just on landing in DXB), you can stay steril and turn around within 2 hrs. I have seen this done LHR-DXB-LHR as well as HKG-DXB-LHR.
The immigration check at boarding may insist on appropriate passport or visa for onward travel (right to enter LHR or final destination if LHR is transit).