The layman-like way of looking at the engines of the first generation vehicles does not necessarily reveal such great differences, as it does with the car-bodies. Fuel which transfers it's energy to one or more pistons, is still ignited. Neither has the basic principle of the crank mechanism changed very much. Only when one compares the first internal combustion engines with steam engines, do the differences really become apparent.
In addition, one should know, that the first inventors, e.g., Lenoir in France, Otto, Daimler and Maybach didn't actually want to build a motor car engine to outbid the speed of carriages, which had been around for more than 2000 years, they were actually thinking about stationary engines. In the beginning, Benz also built two-stroke engines, which were aimed at small enterprises, those who could not afford steam engines.
All the products of the above mentioned inventors worked on the basis of a changeable volume through a piston in a cylinder, with an adjustable inlet- and outlet port and (in contrast to the steam engine) internal combustion. Lenoir adapted the crank mechanism of the steam engine. His invention, in 1860, never had the compressing of the air/fuel mixture, which was added by Otto, with his four-stroke principle. The Scot, Dugald Clerk, is considered to be the inventor of the two-stroke engine in 1881, he who like Benz, wanted to get around Otto's patent. Daimler and Maybach, independent of Benz, reduced the size of the engine to make it portable by usung liquid- instead of gaseous fuel.
Before Diesel, in many years of work, finally got his engine running in 1897, one had been dealing with the problems of petrol engines for quite a long time and Benz, Daimler and Maybach had rebuilt their maschines for use as vehicle engines. We won't go into the attempts of various other inventors, like the French, Beau de Rochas, the Austrian, Marcus or diverse Italians like Barsanti or Matteucci, whose offerings never went into larger serial-production.
Even if one looks only at the development of the combustion engine alone, and not that of the complete vehicle, one sees the magnitude of the environmental requirements necessary for it's production. Iron, e.g., has only been produced in Germany for a little longer than 100 years, the production of steel was still a long way off. The casting and molding of metals had first to be mastered, the densifying of iron materials through forging, to achieve more firmness and less weight, is a typical requirement for an engine that is no longer to be used as a stationary power plant but to power a vehicle. In addition, there was the precision of the machine tools, which had to manage the high gas pressures reigning at that time. The problems became really explosive during the development of the Diesel engine.
A great deal of effort was also necessary in the field of lubrication- and fuel production. The exploitation of crude oil through drilling and the processing in refineries has only been around for a relatively short time. Developments in this field would by the way, accompany the history of the combustion engine right up into modern times (and beyond). Indeed, to get the engine to even run reliably, the problems with the petrol atomization and indeed, also the ignition would first have to be solved.