Basic steam engines are fairly easy to build, possible even in antiquity, it's just that you need more precise tools to build ones that are efficient enough to be very useful. Still for barely plausible super-early development, how about this:
Starting around 600 BC there was a primitive railway system on the Isthmus of Corinth, letting shipborn cargo avoid the long trip around the Peloponnese peninsula. Let's say a Hero of Alexandria type genius comes up with a primitive steam engine a few centuries earlier somewhere around Corinth. It wouldn't be too much of an intuitive leap to try hooking a basic steam engine up to the existing railway to save on all the human and animal power currently being used to haul stuff along it. It just has to be barely efficient enough to be worthwhile at first, and then a few centuries of trial and error can turn a very basic engine into something more practical, which could start to be used in other contexts. A few Greek cities could start to get rail links between each other, and then if the Roman conquest has happened as IOTL they could spread through the whole Roman world. If they got them working decently railways definitely seem like the kind of thing the Romans would be in to.