There's a little problem with fuel, for openers. In turn that depends on the development of organic chemistry, and some sort of push to extract crude oil as a natural resource rather than simply skimming it off ponds as it occurred naturally. And then for the Otto cycle to be workable / practical, you'd need electric developments to yield the mechanism by which a spark is produced at the proper time. That in turn leads me to conjecture that given its strictly mechanical nature the Diesel engine might have been developed sooner: kerosene (not greatly dissimilar from diesel fuel) was generally available in the 1850s or so; advances in machining to yield the close tolerances needed for diesel engines might have been feasible.
Frankly, given the number and scope of supporting technical developments required, I'd guess that the development of the Otto cycle engine came about roughly as soon as it possibly could.