When on a road trip I would only give the dog enough water to keep them hydrated and enough food to keep them from becoming hungry.
That would prevent the dog from needing to poop or pee often when on the road trip.
When you do that and are traveling with a dog you should stop at least every 2 hours on a road trip to let the dog out and exercise and go pee or poop.
Allow the dog to walk around for 10 to 20 minutes before starting out on the road trip again.
I would ideally though plan to stop every 1 hour and 30 minutes to allow the dog time out to pee and poop in case they need to do so.
A dog will usually let you know by getting restless and making noises and moving around in the vehicle when they need to pee or poop and if they do you should pull over when possible and let the dog relieve itself.
Stopping every 1 or 2 hours on the road trip is also a good idea so that you can stretch and your other passengers if any could also stretch and go to the restroom too.