The solution on a bike I had delivered recently was to remove the handlebars, leaving all cables and levers in place, and zip tie them to the stem & top tube, with some padding. The wheels were in place, so the box was large (approx 210x110x22 cm).
You do of course need a stem with a removable clamp plate, and the cables were regular under the bar tape entering the frame around the top of the down tube.
With cables treaded down through the stem, I doubt you'd get better than just turning the bars parallel with the frame.