You can also take a ferry from Sorrento to Amalfi. I have twice taken
it from Sorrento. There may be one from Naples as well. From Salerno I
believe the train goes part of the distance to Amalfi, and you can
probably take a bus from there.
The quickest most direct way to get from Florence to Amalfi is as OP has planned-
Direct train to Salerno
Ferry to Amalfi which takes 35 min
The ferry from Sorrento would require several transfers
Florence to Naples
Naples to Sorrento via Circumvesiana
Transfer to port
Ferry to Amalfi which takes 1.5 hours
The ferry from Naples to Amalfi usually requires a transfer to another ferry in Capri.
There is a train that goes from Salerno to Vietre Sul Mar but you’d then have same issue of timing your arrival to Salerno to catch next regional train to Vietre then waiting for bus in Vietre Sul Mar to take you another hour to Amalfi.
There is a ferry from Vietre Sul Mar to Amalfi but that takes an hour and some of them actually go back to Salerno first.
OP- Your plan is solid. If you are concerned about ferries not running then you could book a driver from Salerno to Amalfi- that’ll cost a lot less than a driver from Naples.
I think you need to extend your time, or plan two different trips. Or
cut Florence a little shorter.
Huh? OP hasn’t shared any info about overall itinerary.