Direct injection solves much of this- can't have preignition if the fuel isn't injected until after the point of pistons relationship to tdc that preignition can occur.
Or there might also be a change in the size and strength of the parts -starting with pistons/ rods

my 554 diesel tractors piston/rod vs. my boats Volvo OHC gas piston/rod compare this way...
Both will run at rated power for a very long time- one at @ 5000rpm @ 9:1 130 hp 130 cu inch
the other @ 2000rpm @16:1 and (only) 55 hp 203 cu inch guess which one is the 55 hp diesel :laughing:
I like the HD low rpm diesel design for tractor work. the gas version works well for a boat engine that needs a much wider RPM operating range
I would think that a gas engine would actually work pretty well for a hydrostatic drive tractor- ( pin the throttle) and go
but if a gear drive- give me a low rpm/large cu inch diesel all the way