I tried positioning dummy nodes so that they're not counted as "real" nodes and do not get their own dedicated space. This prevented some sprawl, but there needs to be a better way of putting the dummy nodes between real nodes. Perhaps drawing a line from the tail to the head nodes, then finding the closest gap between real nodes in each layer to that line.
Sounds like a lot of work.
The main thing I learned is that unscaled x positions need to be assigned before inserting dummy nodes so that there is a chance of actually placing dummy nodes between the real nodes.