Hey there, yes you're definitely on the right track. I'm not sure if you've been to Italy before, but Rome is a bit less chaotic than Naples, so perhaps start there, with jet lag get settled in before heading down to a more hectic city. Where are you staying on the AC? Personally, I would choose Amalfi, large enough to wander, bus up to Ravello, take the ferry along the coast rather than buses, god forbid. Positano is best viewed from the water, no need to day trip there. OR - Others recommend staying in Salerno, good beach and a real town with good food, you can access the AC via ferries from there. Also use search bar above, just type in something like, 'Salerno Forum'.
If you haven't booked your flights yet, you could consider a multi-leg, into Rome & out of Naples, no back tracking. I loved Capri & have been 3x, but haven't been there in decades, lots on the forum using the search bar above about how to spend at least a day there, frankly staying a few nights would give you a better feel and be quieter in the evenings. As others have mentioned, do see the Archaeological museum in Naples! I still recall the awe and wonder of it's statues, long before i was interested in ancient Roman & Greek art. It will help make your visit to Pompeii come alive.
If interested in a deeper dive into Pompeii, watch Pompeii, The New Dig on YouTube. Before our Dec trip to Rome, I got much more interested and immersed in ancient history & archaeology, it really made a difference!