I would think that modern carbon frames can be designed to be more comfortable than a steel bike. Trek is putting dampeners in some of their frames. It is a more versatile material.
Straight tube bikes are somewhat limited in shape and design plays a big role, and I would think titanium, that is not a steel, would be the next on comfort with all things being equal.
Next would be steel.
Aluminum would probably be the least comfortable, having a couple of Cannondales, and I put it at the back of the class. I’ve never ridden a Vitus 979, so I can’t rate how comfortable that flexible frame was to ride.
John