Where you want to return the car? Depending on where you want to drop it off you may need to find a corresponding rental place and that may decide whether it is Pisa or Lucca for you.
You should definitely be cautious about parking with your luggage in the car - especially in known touristy areas like Pisa's tower area. I can't imagine losing your luggage in Lucca but the impact to your trip is so high that even a slight chance is a problem. The other problem with the luggage is carrying it around and storing it. Either city has luggage storage near the station and they are about 30 minutes apart by train. If you are determined to see one place, rent a car and see the other then I think Pisa then Lucca makes way more sense since I think Lucca is a safer place to park.
Without parking it looks like either:
Train to Lucca, stash luggage, see Lucca, collect luggage and head to Pisa, stash luggage, sight see and then collect it and rent the car. (Or this same plan but switch the cities.)
Or you might think about train to Pisa, stash the luggage, see Pisa, train to Lucca luggage free, train back to Pisa, pick up the luggage and then rent the car.
One problem is you are trying to do a lot in one day and you need to think about when the car rental place closes. The airport location may be open later but day of the week really counts so don't try this on a Sunday. You're looking at 5+ hours of trains and driving on this day before it is over.
Whatever you decide, have a great trip,
=Tod