So what do you call an engineer that designs/optimises/etc. locomotives?
"Mechanical engineering is the discipline that applies engineering, physics, engineering mathematics, and materials science principles to design, analyze, manufacture, and maintain mechanical systems. It is one of the oldest and broadest of the engineering disciplines. " https://en.wikipedia.org/wiki/Mechanical_engineering
My father was one, but designed gas compressors for oil & gas industry.
Locomotive Engineer's basically are the one in charge of operating the locomotive. What most people think of as a "Conductor" is actually a lower level job and is mostly paper work from what I hear.
Source: Close friend is a Locomotive Engineer in Canada.