Thanks all for this excellent tip. The REX on my i3 (2016 UK model) was failing with 'misfire' and 'lambda sensor' errors, always occurring very soon after starting the REX - within about 1mi. About half the time it worked OK - if it got past 1mi then it would keep going indefinitely.
My local garage had tried everything in the BMW diagnostics process without luck, and could only suggest as a last resort to replace the fuel injectors - £900. So I did some internet searching and found this post, and sure enough replacing the fuel pump relay has fixed the problem. I opened the old relay and the contacts were badly burned. Poor design BMW.
For others with a right hand drive i3 (UK market) the relay is under the glovebox, so same approach to replacement as for the LHD (USA/euro) model. The relay is behind a ventilation duct so is a right pain to get at. Its impossible to see what you are doing, so you have to do replacement entirely by feel. I'm glad I had a USB endoscope to have a look first at what I needed to do.
Note on my car the fuel pump relay is the LEFT of the 2 relays, not right, as many people on the internet say. Maybe they flip the relays around for the RHD cars. Which relay was which was clear because when I pulled the right hand relay the car gave a fault about 'engine fan relay open circuit' and replacing this relay did not fix the problem, whereas when I pulled the left hand relay it gave a fault about 'fuel pump relay open circuit', and replacing this fixed the problem.