When heat engines convert heat into work, they change the random motion of millions of particles into motion in a single direction. What is the phenomenon responsible for this alignment of trajectories? Can quantum physics explain it?
This can be explained with a classical description of particles; quantum physics is overkill.
The explanation stems from the physical constraints of the system, and therefore the specific details are completely system-dependent. Generally speaking, it involves some form of non-random selection of a subset of the random motion.
To give you an example of how random motion can be directed: suppose you place a gas in a container that is floating in a vacuum, and then you drill a hole into the container. The previously random-gas will escape through the hole and will therefore now be travelling only in the (say) positive $x$ direction, with no atoms travelling in the negative $x$ direction (excluding the container itself). There isn't any sort of magical, low-level phenomenon responsible for this process.