For entire line features:
Use the 'Extract Vertices' tool to turn all vertices into points.
In the new points layer create a new field for the height value and populate it using:
Now use 'Join Attributes By Location (Summary)' and join the line feature to the vertices (you may want to delete some of the fields automatically created by extracting the vertices first).
The new Joined Layer will be automatically populated with statistics about the joined attributes, including mean, min, and max.
This will maintain the original IDs, it will result in a lot of unwanted fields which you may want to delete.
For individual segments:
Use 'Explode Lines' to convert the whole line feature into individual segments.
You might have to 'Drape' the result again to restore the z-values.
Create two new columns in the segments layer for the start and end height, in field calculator use the following:
from those values you can create new columns for average, min, and max using the following field calculations:
("start_height" + "end_height") / 2