Ferengi culture reveres those who swindle people for maximum profit. So why aren't Ferengi spaceships constantly breaking down because they were fitted with shoddy or non-functioning parts?
It's a common misconception that the Ferengi revere those who swindle others to maximize profits. The truth is, at once, simpler and more complex: the Ferengi only really care about maximizing profits, and don't much care how it's done. A Ferengi who corners a market full of lemons by producing significantly more reliable parts at competitive prices is just doing good business. If others see him as more "honest", well, that's good for public relations, and there's some value in that, but it's not really the point. (And besides, those who care about honesty would probably do well to put this Ferengi's sources of materials and labor under heavy scrutiny).
Because of this greater emphasis on profit, the Ferengi are prepared to tolerate some loss of quality in the name of lower costs, or, more generally, some increase in risk in the name of greater opportunity. They will even tolerate these things to a greater degree than others might, because there's a great deal of reverence for the guy who bets on the long shot when it pays off. Consider Rule of Acquisition #62: "The riskier the road, the greater the profit".
But there are still limits. Rule #125, as quoted in other answers already: "You can't make a deal if you're dead". Ferengi ships do seem to suffer from some reliability issues as compared to other ships, and the Ferengi put up with this in the name of cost. But no Ferengi would buy a ship that did not, on a basic level, function, nor would they buy one without asking for a demonstration of its functionality. An offworlder might, and those are the ones you foist the lemons off on. You don't insult a shrewder customer's intelligence, though. Bad for business.
Rule of acquisition #125:
You can't make a deal if you're dead.
Surely, no self-respecting Ferengi would break rule #3, but note the wording: "Never spend more than you have to". Certainly, you have to spend enough on your spaceship to stay alive and avoid getting stranded 25 light years from the next outpost.
Ferengi selling starships to other Ferengi will arguably be tempted to be deceptive, but finally they are limited by rule #17 ("A contract is a contract is a contract... between Ferengi"). A clever Ferengi buying a Starship will (unless there is no other choice) not put his thumb onto a contract which doesn't guarantee an operative ship and at least standard quality parts.
That being said, Ferengi spaceships do have shoddy parts which do break down occasionally. That, and distant relatives will occasionally deliberately sabotage them...