A fascinating subject!
It varied from tramway to tramway and the mines or quarries they served.
Some ended up being rebuilt as railways though their original courses did not follow the same routes as horses could pull waggons up 1 inn4 inclines, where steam locomotives could not (Unless specifically adapted to do so. Actually, the very early locos built to run on these early tramway lines were built so they could go up very steep gradients which is why there was debate in the very early 1800's about rail adhesion and why some very early experiments with toothed wheels to overcome this. I read an account written around 1812 of a rail journey taken by a person who sat on top of a loaded waggon (One of many) going behind one of these early locomotives, and they reached a bank and ditch going across the line where the line itself went up, down and up again... Horses just took this in their stride as they just walked them back and took a waggon or two at a time and re-assembled their train on the other side. This steam loco could also do it but they used a different method, so realistically, many of these early tramway lines, there was no big advantage over using a horse or horses.... But the procedure was to empty all the load from the waggons first and load back on the other side which obviously the extra time taken was no advantage compared to a horse. The loco itself had a way where they could directly inject a full amount of steam into the cylinders giving it more direct power? (It had something to do with it being an unconventional approach that was not possible in locos built in later years as these early locos were designed differently to do this. I can't picture what they meant but remember being fascinated by the description). They would then operate the loco by walking with it up and down the bank as it pulled its now unloaded lightweight waggons with it along with all available people pushing to help, and it would be all hands on deck to load everything back on the other side.
I don't know if you have seen that well known elderly film done in humour, but these old locomotives could actually do things later locos could not! (I will see if I can find the YouTube clip of it. Here it is below).
https://youtu.be/QXBwzC4JYC0?si=W2houyZ5VYz4iZGA
Now another two reasons why for around 25 to 30 years they rarely used steam locos on these lines. They did break plates. (Rails). For a good few hundred years on narrow gauge lines (Which most of these early locos were though they used various gauges depending on use. Usually the narrower gauges of 2ft or 2ft 3 inches were used due to the need for waggons to go through narrow mine passages. However, many tramway lines were wider because it suited horses better. Most underground mines were hand pushed. Now for a few hundred years, the 2 ton waggons were preferred or of a lower tonnage for inside mines but the two ton was the weight a man could handle them on their own on surface lines. (Underground it was less). Now larger waggons of 3 ton were tried but these not only were not so forgiving with the iron plates, but they needed two people to push them. So for 2ft gauge lines (Or similar gauges) they preferred 2 ton waggons as standard, and down mines for specific use they were smaller... The wider gauges were the ones more popular because horses found it better. So 3ft or there abouts (Or around 2' 6" onwards) the longer distance horse drawn tramways were more popular. (Stevenson actually came on the scene around a decade later when it comes to steam locos BUT started independently to the events going on in Wales, but what Stevenson did out of convenience, is use the stage coach of its day and take that as the gauge width for his locomotives, which ended up being 4'8". Later when higher train speeds came along, they had to add an extra half inch when train speeds started exceeding 60mph and edged to hit 80mph to prevent excessive wear on the wheels and rails. The extra half inch track gauge where the gauge of the locos wheels remained the same became the solution. Broad gauge did the same but as broad gauge was designed with speed in mind, they only had to add an additional quarter of an inch which is why early lines were listed as 7'0", and after a certain date they were listed as 7'0 1/4")
But apart from gradients of early tramways being suitable for horses, curves were also often too sharp. So when thees old tramways were eased to re-build them into railways, extensive work was needed, as these old tramways were often layed on the surface of the ground. They did do some groundwork where needed and some tramways were quite engineering feats in themselves! But most of them were the most convenient way to get their goods from one place to the other!
Now mines and other industries can have all sorts of things happen where they either do really well and the tramways end up as railways, or they can hit disaster of one kind or another where they close along with the tramways that relied on them for their survival.
In the UK many mines closed when the outside world opened up so ores could flood into the UK from far away places at cheaper prices then they could be mined in the UK. Incidently, were you aware that Wales (UK) was rather unique in that geologically speaking contains such a variety of ores under its ground that to match the variety, it would take the whole continent of North America to do so. It is the reason why the industrial revolution in Wales started earlier than it did in most of the rest of the UK. E.g. coal mining was well established in some parts of South Wales in the early 1500's in one valley which had already exhausted itself from an entire large woodland area which was almost entirely cut down to feed the hungry iron furnaces which in its day was the largest supplier of cannon and musket balls in the whole of Europe not too far away (Known as "Kings Wood" due to its past history and was a very famous very large woodland). The furnaces actually supplied cannon balls and musket balls to customers on both sides of some of the past notable wars! When they ran out of wood, they found coal to be an ideal replacement where "Cell mining" began. Cell mining was done before the days where water pumps and air ventilation solutions came along. Indeed, such was the demand for pumping engines in mines, many early locomotives were soon converted into mine pumping engines instead. The basic idea of cell mining was to drift into the side of the mountain following a coal seam to form a circular cell under the ground where they could reach some of the coal. They could not go further in due to lack of air and the risk of flooding. (The area they did these cell mines was vunerable to flooding through sudden bouts of rain which also had arounda months delay on the water table, as local springs can go from almost dry to full flow a whole month after heavy rainfall had been and gone!) Once the cell was mined out as far as they could go, they came out, moved sideways and created another cell, and then another and so on. So many small cell remains now collapsed into holes can be found on this mountain side.
These cell mines were back in the 1500's but certainly by the 1700's onwards when methods of mine ventilation and water audits were invented and later came steam pumps, they could then follow coal seems further in. Thus the early tramways came along along with canals and then railways. Indeed in this valley where the side of the mountain was cell mined, had a route used to take coal by pack horse (Coal in saddle bags) to take it the few miles to reach the sea for onward travel to the furnaces. Then canals came along and these were used where barges further up the canal in some places used a large sledge system instead of using locks, where the flat bottom barges would slide on the bottom of this large metal U-shaped device that the canal barges slid on before going back into the water at a higher level. Then the filled in some of the canal to build a railway on top, part of which became a cycle path when the remaining coal extraction ceased. (Still more coal down there than was ever extracted, but todays environmental concerns and insurance costs and now we have gone all "Green" despite the coal being a smokeless coal, means that there is no market for it).
But this is the same with tramways. The railway was served by a few mine tramways at certain times where these tramways had served the canal before that. There were similar tramways including inclines on the other side of this hill. A whole large history in one place. Yet... It was one of a great many places like this in South Wales dedicated to extract coal or iron ore as depending where, coal and iron ore in the south were the main ores... BUT (And you will love this) the cell mines minimh for coal were not the first mines! Not far from the cell mines was an old Roman silica mine which many years later when the industrial revolution came along was reopened to mine for coal! The Romans wanted silica to make bricks. Both mountains also had top quality clay, so finding both clay and silica in the same small area was like gold to the Romans!
Talking about gold... Around 60 miles away the Romans mined for gold on a massive scale, and later developed a method of extraction that abstracted far more gold from the area than using modern methods! Could not be done today due to population living in the area, but what the Romans did was to make large reservoirs of water a the top of the area they wanted to find gold. They would then when ready, suddenly break their dams letting the big rush of water go down the hill thus exposing the gold. This water was a massive amount at one time and scoured out the valley below. I think they were genius to do this! Hope no one was down the valley below at the time unaware what was going on!
Just to add extra info about mines and Wales. (Rest of the UK also had amazing mines and tramways).
Mid Wales have loads of abandoned lead mines.
North Wales has slate mines and quarry, and also copper. The only useful ore that was in Wales but in not in quantities large enough to bother mining was tin. Cornwall had tin. But other ores Wales had, and the three main ores which were said to be the finest in the world were slate, coal and iron ore.
Budget modelling in 0-16.5...