You need to keep in mind that no one here is looking over your shoulder, so you need to supply all of the important details, in order to have a chance of getting any meaningful help.
I think you'e saying that the starting of this vehicle is completely erratic, with no pattern for the no-starts. And it also will eventually start, after some random number of no-start attempts. Is all of that correct?
You posted a list of things that 'are working', but did you test them with a meter or other diagnostic testing (such as swapping the relay)?
2011 3i 2.0 A/T 145K miles