The easy part is the global speculation about how an engine is designed.
First of all, steam production is the classic speed limiting factor in practice, in connection with train load, grade and schedule (stopping or through train). Even the earliest engines had impressive maximum speeds, they just could not pull much at such a speed.
The gist of what I read about engine design is this:
First, there is maximum axle load on the routes where the engine is to be deployed. Multiply that by the number of driven axles you can manage to run through curves and you get the maximum force defined by friction. (There is not much you can do about the friction coefficient of the wheels on rail, but you can get up to 6 axles coupled with a bag of tricks.) Running axles are mentioned below.
Now build the best boiler that suits the total weight as computed above (after subtracting the other parts of the engine). I.e., maximise the heat transmitting surface. Add as much superheating as the grease that keeps the cylinders tight will stand.
Then build a firebox that can produce the heat thus transferred. This mostly means making it wide (i.e, between drivers or more often after the last drivers, or above drivers; and deep, which is limited by the throw of the fireman. Or go for a stoker or burn oil. The type of coal is relevant, too, though that was generally given by the region where the engine ran.
For the cylinder, I don't remember the upper limit on the stroke. I do remember that there were legal limits on the travel speed of the piston, and even without them, you need very balanced gear to push the number of times it goes to and fro. That equals the revolutions of the drivers, and their size is limited by the loading gauge and the boiler size. At any rate, you can't have monster drivers and a monster boiler on European rails.
The maximum speed of the piston, its stroke and the drivers define the theoretical maximum speed. The practical experience of running at such speed will make the officials define the actual maximum speed somewhere below this. Actually, where there is no legal limit on the piston speed, you just see how fast you can run before the shaking and stomping becomes unacceptable.
Now the big question is - how much train load can be taken?
The power you get is defined by how much steam you can get per hour and the regulator setting at which you run at that speed (and the actual boiler pressure). The formula I use (and MSTS did so, too), is:
boiler pressure * reverser setting * number of cylinders * radius of cylinders * radius of cylinders * Pi * stroke divided by the double diameter of drivers
If boiler pressure is in kg/cm², the result is in kg (force). Multiply by 9.81 to get N. Ask Wikipedia for bar and such and how to shift the comma there, anyway bar ties in with N without ugly factor.

(There is a range of losses to take into account, the traditional figure in MSTS was 6%.)
The force you need depends on grade and train load, plus resistance in curves and air drag, to a lesser degree. You could put in desired acceleration and train load, but this did not seem to be as much concern as fast trains did not stop often and using an engine that could pull a heavy train up a serious grade for heavy yet swift stopping passenger services yielded fair enough results.
Now that you are disappointed with the train load that you can pull up some given grade at decent speed, you will shout for higher engine weight to allow for a bigger boiler. Running axles are the solution, but with the decrease of the fraction of weight that sits on drivers. This is only a pain when running at low speed and it can be overcome with care and sanding. Yet it makes such engines unsuitable for constant operation at lower speed.
You can also up the boiler pressure (subject to limitation on boiler material), invest into the complicated stuff that Chapelon and other did to optimise exhaust side, use compound engines for more efficient use of high pressure, or talk your customer into improving the permanent way so you can up the axle load.
End of 'How Andi sees train history'.
The bit about telemetry into a .csv, I don't get.
I looked up some curves from East Germany in the 60ies (Merkbuch für Triebfahrzeuge) that shows regulator setting an TE, over speed, and it looks like the reduction in TE cannot only be explained by the reduction in fill grade. However, I have no idea about the quality of those graphs and sure enough the exhaust issue plays in there, too. Like you said, the latter is a very complex thing. Every time I read up on that, I get a head ache.