In my experience one can generally see 2-3 small towns when day tripping from a base location. When traveling between places I try to limit driving to 3 hours a day with a couple stops see things to break up the drive.
I can’t speak to Gijón as I haven’t been to it and haven’t been to Oviedo in a couple decades. How long you need in each will depend on what you want to see. As they are cities, driving could be a pain due to congestion and pedestrian only areas. Look up parking before going over.
If not spending a night in Lugo then 3 hours should be sufficient. The major draw to the town is the UNESCO Heritage Roman wall that surrounds the town and that one can walk along. If you decide to spend a night there I can recommend a hotel.
Depending on the town/village you may be able to find lodging at the last minute. If it’s a main tourist destination or a town/village along one of the Caminos, then lodging might be more difficult to find. While there are more hotels in cities, they are not as noticeable as in the states. There are generally few large signs, no flashing lights, and many are in pedestrian only areas. You probably wouldn’t want to be driving in a strange city while trying to find a hotel that only has a smallish sign on its front. What you could do is make a reservation a day or two in advance once you have a good idea of where you’ll be.
Personally, I stopped trying to wing it with hotels around 2011.