Pompeii opens at 9:00am and when we visited 20+ years ago in late June we knew it would be well worth it to get there when it opened, then stay until the increasing heat and crowds became too much for us. So, since we were driving from Venice to Sicily (we had reasons for that at the time, but wouldn't do it now), we stayed at the Hotel Forum Pompei right outside the gates of Pompeii for two nights, seeing Herculaneum the next morning before driving to where we were getting the ferry to Sicily. Our strategy worked perfectly and my unflappable husband thought driving in the area was fun (not many people would). I don't remember what we did after Pompeii and before dinner, probably just hung out at the hotel and took naps. If you didn't want to see Herculaneum or the Naples Archaeological Museum, you could return to Rome by trains.
On a later trip, we stayed in Naples for a week and visited the truly unmissable museum full of things removed from Pompeii. So, now, I would recommend your staying in Naples (perhaps near the archeology museum as we did), and taking the trains to Pompeii first thing in the morning (yes, even though it will be September), stopping whenever you've had enough, and then visiting the museum that afternoon --- it closes at 7:30pm, just in time for dinner (if you stay a 2nd night in Naples) or for you to get back to Rome if that's what you want to do. No need for a car. We walked from our Naples apartment to the train station to go to Rome, but you could take a taxi.
To me, staying one (or two) nights in Naples seems logistically simpler than staying on the Amalfi Coast, but maybe that's just because I know how to do it that way. Doing Pompeii as a day trip from Rome seems like a hellish day, although people sure do it.