This is actually how temperature is defined in Carnot's conception of thermodynamics. Here's how he argued.
He showed that all reversible heat engines working between the same two reservoirs must have the same efficiency, otherwise one could use the more efficient one as a heat engine, the less efficient one as a heat pump and thus pump heat without input of work continuously from a colder reservoir to a hotter one - in violation of his formulation of the second law of thermodynamics. That's a simple an neat argument and it's known as Carnot's Theorem: that all reversible heat engines working between the same thermal reservoirs must have the same efficiency, regardless of their makeup.
But his true genius was to understand that this observation could be used to define the "hotness" of something. Up till that time, there wasn't really a deep definition of hotness or temperature aside from in terms of measurement instruments (even thought these, even then, were becoming quite sophisticated). Carnot defines temperature thus: we take a "standard reservoir" and call its temperature unity, by definition.
Then if we have a hotter reservoir, we run a reversible heat engine between the two, and if the heat engine expels $Q_2$ units of heat to the standard reservoir for every $Q_1$ units of heat drawn from the hot reservoir (thus outputting $Q_1-Q_2$ units of work, then we say that the hot reservoir's temperature is $Q_1/Q_2$, by definition. Likewise, if we have a colder reservoir and run a heat engine between the standard and colder reservoir and the heat flows are $Q_1$ from the standard and $Q_2$ to the colder, then the temperature is $Q_2/Q_1$ (less than unity), by definition.
With a bit more work, all these ideas imply the existence of a function of state, entropy, but that is another story. See my answer here for further details.