I was asked for an onward ticket at Phuket Airport in October. Fortunately, I had one in case I was asked in San Francisco. I wasn’t but I’m glad I had it in Phuket.
Of course the airline clerk shouldn’t have a problem with you stepping aside and buying an onward ticket online. But, I wouldn’t want to rely on Immigration being that accommodating.
In October, arriving from the US, I was asked for an onward ticket at Phuket Airport. Fortunately, I had one in case the airline asked in San Francisco. They didn’t.