It is a gamble as mentioned but if you are extremely technically inclined, know where to find parts, and are willing to put in the effort you can save massive amounts of money. I've bought used machines a couple of times and for truly incredible prices. As long as the machine was not improperly strapped down to transport it and nothing is twisted or bent then you can get one going. If improperly strapped down, like across the middle of the machine or the machine has been dropped or in some way mishandled that the frame or chassis could be warped or bent, there is no fixing that. It might not even be obvious but you will never, ever, get it to print quite right. Best case is it will be obvious and things will bind up as it tried to move. I say best because you will have saved a ton of time and money trying to fix it. If the chassis damage is not obvious you can spend literally thousands and thousands of dollars on new heads, tubing, dampers, pumps, etc only to find that no matter what you cannot get it aligned right and while it prints, it will be blurry and look terrible.
That being said the most common issue will be the heads are clogged from sitting. That in itself can sometimes be cleared up with a LOT of patience and effort. Or you might have to buy new heads and some other bits like dampers. I've gotten lucky once. Bank repossessed machines. Got a Mimaki JV33-160 and a Summa S-160T cutter. Paid a whopping $7500 for both about 7 years ago. Both still run great even today. Literally did not have to replace a single part on either one. Took about a week of cleanings and soakings to get the head back 100%. At the time, new, those two machines were a $22000 value. Yeah - I made out like a bandit but it was a very big gamble. I had no idea who moved them and how they were handled. I did find out that they had only been repossessed only two weeks prior to my buying them though and they both looked new and clean as a whistle. I'm also an extremely technically inclined person as well so I was not too worried.
For most people I'd say its not worth the risk unless you are buying from a shop that can demo the machine running or you are buying from a dealer who took it on trade or its a demo and guarantees it in good working order. Anything else and you are potentially gambling with some pretty big money.