Replacing components like a phone screen, yeah - but not the kind of thing the OP is talking about. More like replacing a worn USB-C port on a random motherboard using a soldering iron, hot air station, and microscope, or tracking down an unknown failed component on a circuit board, or swapping a random surface-mount Motorola chip in the ECU of your early-2000s car. Sometimes there’s a whole market square where every shop specializes in one of these things.
And it's not that expensive.
After getting sucked into "I bought this to repair it" YouTube I started looking for things on eBay. I was amazed to find that things like PlayStations with declared faults which made them completely unusable were selling at 70-80% the price as things which were sold as working.
The only thing I can imagine is that there is an underground repair business buying broken items to repair them and resell them that was efficient enough to keep the margin between non-working and working that low.