Interesting post raven, I can imagine quite a few changes would have to be made to the engine to tolerate a much lower idle. Though it could provide an alternative to APUs and regular idling. In my opinion it may not be economically or practically feasible as, even if slightly greater efficiency were possible, it would require a very extensive clean sheet engine design, years of testing, and all for benefits that could be perceived as marginal over APU units. Another hurdle manufactures would have to clear, though not directly related to the engineering aspect, is convincing fleet management companies to buy into a new technology such as this. My guess as to their main point of incontinent would be that: the engine is the most costly aspect of the truck to maintain already, and therefore they would like to discourage overuse by excessive idling. I can imagine another reason they may be rather reluctant as there could be quite a bit of exposure on their part when leasing out vehicles with new technology, i.e if there's a problem with the trucks they may responsible to compensate for losses whether it be freight, the drivers time ect.. Back to the engineering aspect, I think the others comments do a good job highlighting some of the restrictions of the typical diesel engine that may prohibit this based on traditional the design. A few of the main reasons why I think its not a pragmatic solution even from a clean sheet design is, the volume or displacement of the cylinders would have to be adjustable, along with a reduction in the amount of rotating mass due to the friction associated with it.
Essentially designing it to be more efficient than a generator would require modification to each of these two already very streamlined characteristics. For Example: By simply taking the most difficult aspect to overcome i.e the friction involved would entail designing an engine with less durability. Based on current technology an engine that can provide enough power to haul large loads up 10 mile high mountains has to have large enough connecting rod journals, pistons, and crankshafts, all of which entail high surface contact and friction. When considering this point alone, a smaller engine like one in a generator would consume much less energy, even at full throttle, than that required to slowly turn an engine with the above capabilities. When adding loads like; large power steering pumps, water pumps, air brake compressors, accessories not pertinent to sustaining cabin comfort, the difference of course becomes even larger, further making a less viable alternative. That's even before considering the discussion of the second daunting task of varying the cylinder displacement.