With UK passports you’re entitled to a 60 days visa exemption and free stamp upon arrival no matter where you enter Thailand from.
Or else you can only apply for e-visa through the embassy/consulate where you currently stay. Indonesia still don’t use the e-visa system so you’ll need to make an appointment in person.
You can’t leave any country into nowhere, in fact you enter another country if you leave the thai border and if not entitled to visa exemption you’ll need to apply for a visa. 🤷🏼
But the point here is that’ll need to pay for a visa on arrival into Cambodia anyway in order to get your new visa exemption when you re-enter Thailand. Transit stay at the airport in Cambodia will not qualify.
And this is not a visa run, just a border bounce to get a visa exemption.
Just stay low until you’ll get to the airport where you’ll get pulled aside in the immigration and told to get a proper visa or extension according to your preferred stay in Thailand next time. You’ll not be fined and probably not an overstay stamp either.
I guess it depends on season. Never done it my self so I really can’t give you a better answer than your own guess. Personally I would have been at the airport approximately four hours before departure.