I think it would depend on whether you would need to return to a hotel in the city to pick up luggage, to be honest. That would add a bit of risk depending on location. However, if not you would be perfectly fine to do this, barring any traffic accidents or the like slowing it down. Provided I would have a shower facility available at the airport after the tour, I would not hesitate if it was me. And to be honest, I actually do think it is doable even if you have to return to a hotel somewhere to pick up luggage.
Next time, given your interest in culture and history, I would suggest planning longer time in Bangkok to explore the city and surroundings - the whole country has so much to offer in that space