Fortunately I have a "stupid 'ol mechanical Cummins 8.3CTA" engine with a Bosch P7100 pump and 12 valves. The only electrical engine management bit is the fuel lever cutoff solenoid.
I suppose the throttle position sensor counts too, but that's part of the transmission, thankfully.
It would be an awesome exercise to build a replacement computer for the allison gearbox on there. PWM driving the solenoid packs to select all the gears is all it's really doing.
The trick is writing software code that will never:
Crash or break the computer in a way that causes the gearbox to explode, lock up the rear tires and kill people.
Shift hard or cause unnecessary wear on the gearbox
Operate in some corner edge case that causes something like zero engine retard on descending a hill
And a million other things that would worry me greatly. In the end, at least with my vehicle the tires and wheels are tall enough to reach about 65 mph @ 1850 rpm, 63 mph @ 1800 rpm. I would love to have that 6th gear to get the engine rpm a little lower still, but the risks involved in creating a wiring bypass is too high for my comfort.
I'll keep searching for someone who can replace the program with one that allows 6th gear, for now.