That comparison wouldn't be as bad you might think.
The first functional Diesel engine for example had about 13kW of power and was only about 5x larger than a modern car engine.
This was in 1896. From 1923 onward, the engine type was small and powerful enough to be used in lorries (trucks).
The first petrol engines compare even better to modern engines (in terms of power-to-weight ratio).