While Cosimo III's reign was largely disastrous its possible that Ferdinando could have turned things around. He was apparently strong willed, interested in music and the arts and showed none of the lethargy that plagued his Father, Uncle, Cardinal Francesco Maria, and brother, Gian Gastone. Whether or not he could have devoted his energies to governing Tuscany or simply given himself over to more hedonistic pursuits we'll never know. But its certainly possible that with a compatible and capable wife at his side he could have done better. I think there is some danger in him producing an heir and then still dying young. This would probably mean a regency headed by Gain Gastone and/or Ferdinando's wife. I can't imagine this would work out well for Tuscany.
Despite these challenges one should consider what was accomplished by Francesco Leopoldo several decades later. Through diligent administration and great reforms he recovered the economic position of the Grand Duchy after generations of decline. So in some sense it only takes one really great ruler to set things right. Tuscany has the advantage in the 18th century of being able to maintain political neutrality and being geographically located outside of the major fields of combat.
Thinking outside the box an even better way to secure the Medici and Tuscany would be to find another wife for Cosimo III. His disastrous marriage Marguerite Louise contributed to many of the troubles of his reign, especially the financial ones as he had to support his estranged wife in France. A better wife, one that didn't loathe everything about him and Tuscany, would probably help things a great deal. But its seems like the Medici had a tendency or just the bad luck to marry people whom the couldn't even pretend to tolerate.