It's completely unpredictable. I arrived KIX at 3.32pm on a (slightly delayed) CX flight from HKG. As we got off our plane, passengers started spilling out of a NH plane that had just arrived, and another plane was docking at its stand. The shuttle train had just left, so I ran to the immigration hall, and indeed managed to arrive before anyone else. A minute through immigration, minimal wait for bags, nobody at customs, at bus ticket counter at 3.48pm, with 20 minutes to spare for a bus I would have certainly missed if I'd gotten to the immigration line 10 minutes later, with several hundred people ahead of me.