Since this is still unanswered, I'll describe the method I eventually settled on: I edited the layer symbology so that the lines were mostly transparent. That way, when they overlap, the transparency will stack, giving a similar effect to a true heatmap (but in monochrome, of course). The downside is that it will take some experimentation to get the right transparency, which depends on the maximum number of lines that coincide at any point.
(Also, this ignores the weighting constraint that was present in my initial question. Unfortunately, I see no way around this.)
While not a true heatmap, this method served me reasonably well. Until QGIS adds a real heatmap option for polylines, this seems to be the best workaround.