And without speedometers in many cases.
(I should know, but when were speedometers generally fitted to locos?)
I too began wondering and found that the NRM has an article:
Loco speedometers and track-destroying trains - National Railway Museum blog
You've heard of outreach, but what do our 'Inreach' volunteers get up to at the museum's library and archive?
blog.railwaymuseum.org.uk
Answer
The first in the UK was probably 1874, London, Brighton and South Coast Railway Class G locomotive.
The class seems to have been routinely fitted.
Although they seem to have been the first company to do so and the LNER
(for example) didn't have them fitted until the 1930s primarily for
express passenger locomotives. Although slightly predating the A4 pacific.
One book I read recently also states that, at the same time, the LNER also
introduced posted speed limits on certain stretches of track that had never
before had such posted limits. I'm trying to find a second source on that...