This is a great question. There’s risk in buying any gear, old or new, but given the lifespan of much modern gear, I would argue that, if you choose secondhand gear wisely, it’s actually riskier in many cases buying new gear.
As long as you mitigate your risk, buying older hi-fi gear should not be riskier than buying new. In some ways, there can be less risky buying well-cared-for older gear than newer stuff in terms of long-term reliability.
Much of the gear I work on from the ’70s and ’80s hasn’t even technically failed, in 40+ years. It might need cleaning, service and adjustment, but everything does. A lot of newer gear (Cambridge, Marantz, NAD etc) fails after such a short time that it’s embarrassing, for everyone.
To some extent, you need to know what you are looking for and how to test it when buying older gear of course. This will involve listening to and operating it. Beyond that, an inspection either pre or post-purchase is a very sensible idea and can potentially save a lot of money.
My attention to detail really pays off in terms of inspections. I run through every little detail of equipment you’ve bought, or are about to buy. Potential or new owners can leverage my findings to end up way in front in most cases, often saving far more than the cost of the inspection!
There are, unfortunately, people knowingly selling faulty gear, especially on GumTree. Be very careful and if in doubt, get good advice.