We stayed in Lucca (September, several years ago) as a base to visit Pisa, Vinci, CT, Carrara and a (planned) day trip to Florence. We had stayed in Florence before, so it wasn't a primary destination for this trip. Lucca was wonderful for being slower-paced and less crowded. We were there for 10 nights (rented a car for several days to make day trips) so it felt more like a home base than a tourist city base. We loved the ease and manageability of the smaller town feel. It felt very relaxed during the days we spent in Lucca (walking the wall, meandering the town) and when we returned in the evenings from day trips.
As can happen, there was a 1-day rail strike on the day we had planned to revisit Florence. Having been there before, we didn't feel the loss too greatly and did not reschedule.
If Florence is of primary importance, I'd lean towards encouraging you to stay there to experience it more fully. If you stay in Lucca, you might plan your day trip to Florence on the 1st or 2nd day of your stay so that you have backup days if such a thing should happen.