Speed and Agility ratings are permanently set for each ship, based off the stock design. Damage and upgrades don't change this.
Example 1: if you had a 18 Hull
Medium speed ship with 35 base Sails, and you got +16 Sails from upgrades, you'd still be a
Medium speed ship with 51 Sails. A lot better off in combat than any other
Medium ship, but still not as good as a proper
Fast ship. (I specifically asked Cory about this before.)
Example 2: if you had a 18 Hull
Fast ship but got 20 of your Sails destroyed, your ship would still be classed as
Fast, just operating with a heavy penalty.
Regardless of which category your ship fits into (Fast/Med/Slow), having
any damaged Sail will drop your fuel efficiency. A single damaged Sail is enough to affect you. >1 damaged Sail is exponentially worse. This damage penalty to fuel efficiency is calculated separately from the Hull:Sail ratio penalties and ≥20 & ≥30 Sail bonuses.
Example 3: if you have 18 Hull Fast ship, you have worse fuel efficiency with 36/40 Sails (4 damaged) than you would with 35/36 Sails (1 damaged). I don't know whether dropping below 30 or 20 Sails will remove the associated fuel efficiency bonus, but my guess is it would not affect that.
So to answer your original question, having exactly double Engines/Sails is sufficient to boost your ship to Quick/Fast. As to extra points (to buffer against damaged ones), Engines for sure would be a double-edged sword, since the more Engines you have, the harder it is for the enemy to fully disable them,
BUT more Crew will be tied up to operate them, and you end up with less Crew available to operate Guns or Defend/Board. Sails are passive and can act as a damage soaker, so more points are beneficial in this regard.