Long car rides are not bad for babies as long as you pull over at least every few hours and take them out of the car seat and feed them, change them etc.
If the baby is walking then letting them out of the car seat to walk around is good and will prevent the baby from becoming cranky.
Stopping every few hours is good for you as well and it's a good time to check the baby or toddlers diaper and see if it needs changed.
Although pediatricians recommend stopping at least every 30 minutes on the long car ride when the baby is a newborn which is a good idea.
But the baby is not gonna be hurt if you do need to drive an hour or two without stopping.
The reason that it's not recommended to keep young infants in the car seat longer than 30 minutes at a time is because long periods of time in the car seat could put the infant at an increased risk of suffocating.