Ain't no such thing.
Can't be. Locomotives do different things, which require different characteristics. Approach perfection for one application and you get further away from it for another.
Simple example (assuming you want American diesels). Suppose you want to haul heavy coal trains over a route with some hills and some plains. A big, six-axle, AC motored, unit is the closest to perfection you are going to get. (As a GE fan, I'm going to say an ET44, but that's beside the point.). Suppose, on the other hand, you want to run a short line on a route with lots of sharp curves, and only a few dozen cars a week in traffic. The big CC unit will be hell on your track, will derail on too many curves, and anyway is way more powerful than you need. For YOUR purposes, something like, say, an ex-CR, ex-PC, RS3M might be closer to perfection.
---
Things are even clearer with steam. Suppose you want to run fast passenger limiteds between New York and Chicago. If you're railroad has a water-level route, a Pennsylvania K4s would be a lousy choice (oversize cylinders that demand more steam than the valves can handle at high speeds, for a start), but a New York Central J3 might be close to perfection. If, on the other hand, your route goes over the Alleghenies, a J3 would be a flop (boosters are fine for starting up, but the J3 doesn't have enough tractive effort for sustained hill-climbing), but the K4s... well, maybe not perfect, but gave decades of good service. Which locomotive is closer to perfection? That all depends on what kind of perfection you want!