The best places to stay with dogs are Ibis hotels. They will take dogs anywhere, are usually found in all French and Spanish larger towns and not too far from motorways. I am not too sure about hotels in Germany, but you could try the web and look under dog-friendly hotels in ....
Ensure that you have a large enough pet carrier for the dog in the car, so that he is secure. Also, if your pet is a bit sensitive when it comes to his food, take enough with you for a week and gradually mix local food with it. Ensure enough breaks for walks, watering and general resting.
I would recommend one to two neighbouring countries and two days or so in each location, with walking tours of the city / area for you and your dog.
Also, please note that time of year is also a factor. Spain in the summer is very hot and probably not the best place to go on a driving holiday with a dog then. Also, you have to prevent heartworm and leishmaniasis there. (easy to do, but again an extra expense). Check with your vet at home what else you might want to watch out for in various countries. Also, in Germany, in most restaurants, you can take a well behaved dog inside. In other countries, the dog is only allowed on terraces or not at all.
In the end, I hope you, your friend and your four legged companion will have a lovely holiday!