We did not rent a car. After 3 trips driving around Italy with no traffic or parking tickets, we decided to quit while we are ahead. Also, my husband was 79 last year, and it just didn’t seem like a good idea.
Instead, we signed up for a 10-day Road Scholar tour of Puglia and Matera, and added 5 days on the front end for independent travel along the train line. This was our first-ever tour that wasn’t a small-group (7-10 people guided hiking tour, so we had some reservations about the “big bus” (24 people) tour, but it turned out fine. Our guide Emmanuela was fantastic, and we made some good friends among the other guests.
But a tour like that that won’t work for you. However, only 6 days, as along as you are happy visiting mostly the coastal cities along the main train line, you will have plenty to see and do if you forgo renting a car. Cities linked by the main Trenitalia service include Bari,Monopoli, Cisternino, Ostuni, Brindisi, and Lecce. You can reach Otranto and Gallipoli with the Ferrovia Sud-Est service (although a bus might be faster).
https://www.fseonline.it/s/?language=it
Alberobello, if you must see it, is an hour from Bari by Trulli Link bus, offered by Trenitalia.
But I don’t have any suggestions for reaching Salento, as the only thing I can find by that name, besides the whole “heel” peninsula, is Bagnolo del Salento, midway between Otranto and Gallipoli. Is this what you mean?