This is cool and I wouldn't mind having one myself. The only disadvantage is that it only measures speed at one point in time, in one place.
Many years ago a company called Kansas Junction made and sold a kit, including a custom circuit, to build a "speedometer car." You had to supply your own boxcar. The kit included a circuit board with an LCD display and an IC mounted on it. You had to add a wooden dowel to the car axle, and wrap it with a tach tape (supplied), so that an optical reader could count black-and-white stripes through a hole you made in the car's chassis. You also had to make a mount for the display out of styrene. The whole thing was powered by a 9V battery mounted inside the car.
It works great, although battery life isn't great, and from some angles the LCD can be a little hard to read. Obviously you can't view it when the train is in a tunnel, etc.! The cardinal advantage of putting the speedometer in a train car, is that it lets you measure the train's speed all the way around the loop and note the degree of variation, for example when the train transitions from straight to curved track or encounters a grade, etc. I don't know how many were made, but these Kansas Junction kits are now very hard to find.
If you're only interested in performance testing, there's a more common and perhaps easier-to-use alternative: a Lionel steam RailSounds 1.0 box car! These use a Hall-effect sensor to measure track speed. Every time the speed drops below about 6 mph, the synchronized "chuff" changes to a hiss and release of air. If a train can get around a loop repeating the air release sound and NOT chuffing, that would represent an outstanding performance! But if it's chuffing along slowly, and then abruptly changes to the steam release sound when it enters a curve, then the motor/gearing isn't making enough torque to maintain speed in the face of the increased friction. (Note: All of the testing I did with this setup was in the mid-to-late 1990s, on tight tinplate curves and before the advent of speed control. Only a few of the many locos I tested were able to get all the way around my loop at less than 6 mph. Fun times!)