What if the sea is rough and the ferry is not running? Buy your ticket after you arrive and you know what the sea conditions are going to be. At any time of the year the Sea conditions can change for the worst and so small ferries run.
We were at the Amalfi ferry pier on 30 April 2018, all the ferry ticket kiosks are in a row on the pier. You do not need to book in advance, you can indeed just turn up, buy a ticket and get on. We enquired about tickets to Sorrento and Salerno, and in fact it is not possible to buy advance tickets at the pier (you might be able to buy tickets on a website?), not even on the day before travel. In the event, we went on the 10.35am ferry to Salerno, it was less than 20% full, we were told that later ferries tend to be more busy. Hope that helps! The ferry is a great way to travel, superb views of the coast and we saw dolphins!