While the gearboxes can be fixed and improved you need to pay very little for the car in the first place to make it worthwhile cost wise.
Some have no problems at all.
But there is a reason the Volvo shops don't sell them used or even buy them for parts to sell, the gearbox is rubbish so no point dealing with them at all.
Later models are so much better.
Don't equate low mileage of a 2004 as being good. In reality it's still a $500 car. If that.....