Walking beam pressure pumps (which used cylinders and pistons) date to the 3rd3rd Century B.C. (they used bronze, of course, but it would have worked perfectly fine for steam engines); the.
The crank (sun and planet gearing was used in early steam engines to get around Pickard’s patent on the crank; British patent law of the time allowed someone to patent things that were already in use) dates to at least the 1st1st Century (the Nemi Ships used them in their bilge pumps); flywheels
Flywheels predate civilization, and valve technology sophisticated enough for a water organ could have come up with valves for a steam engine.
Putting the pieces together in the appropriate combination was beyond them, for reasons others on this thread mentioned, but all the necessary components for making small- to medium-sized steam engines were available to the Romans.