This is a great question. Given how long some new gear lasts, I would argue that it’s actually riskier in some cases buying new gear!
As long as you mitigate your risks, 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.
To some extent, you need to know what you are looking for and how to test it. This will involve listening and operating it. Beyond that, an inspection is a sensible idea and can potentially save a lot of money.
There are, unfortunately, people knowingly selling faulty gear, especially on GumTree. Be very careful and if in doubt, get good advice.