Probably the best part of our two-week vacation in Italy was our 5 days on the Sorrentine peninsula, and it was made better by some adventure trips. Driving there is a challenge, but can be exhilarating too. I wouldn't want a car in either place, but consider alternative transportation which is easy to find:
1) Having a scooter in Capri was fantastic. The mountain road to Amalfi is a little scary to contemplate, but the guardrail is high enough you won't fly over it to oblivion if you hit a pebble or pothole. First time up is a little scary but manageable. Don't make it the first time you ride a scooter. Our city has shared Scoobi scooters you can take out with a phone app for a couple hours, so I did that on roads I'm comfortable with here in the USA before the trip. A scooter lets you explore the distant parts of Capri and get out of traffic, which isn't that bad anyway since it's only locals, taxis, the occasional bus, and more scooters. My wife rode easily on the back even though it was her first time.
2) I wouldn't scooter on the Positano-Amalfi road. Too many buses, and the low wall feels like you could easily go over it if you lost control. Vertigo terror. But our hotel also had an electric Renault Twizy 2-seater, basically an enclosed 4-wheel scooter, which felt much safer than the scooter. It made it easily up to Ravello for dinner from our hotel near Positano, could run at 50 kph on straights which is plenty fast enough, and was also great for a beach day exploring the uncrowded coastal spots. It's so small that it fits in scooter/motorcycle parking spots -- instead of 30 Euros to park a car, it was 4 in Ravello.
3) Riding in the public bus, as Rick recommends, is also amazingly scenic. I don't know how buses have side-view mirrors there, or how they pass each other going in opposite directions but they somehow manage. That said, buses are always crowded, which can spoil the experience somewhat.