Then forget the FIFO convention. How about a hardware random number generator?
However, this doesn't fix the problem with placing and canceling lots of orders to sway the bucket toward the end of the 5-minute window. I suppose if some could do this faster at the end of the window then others, they would still retain an advantage.
(Imagine somebody placing many orders, monitoring how many are likely to be fulfilled advantageously, and then cancelling the disadvantageous ones as close to the end of the window as possible.)
That could perhaps be solved with fees for cancelling bids or asks.