Oddly my son's trip when he was 4 was more challenging than when he was 2 or 3.
At 4 .. because he is mobile, he was "anxious" to run off.
My son literally took off when the stormtroopers scared him and came his way. I had to sprint after him
At 4 .. because he was starting to get more independent there were lots of complaints about being tired, hot, food, rides or the next thing to do.
No melt downs, just a lot more "annoying" than his earlier trips.
At 4 .. they are much more "gimme gimme" in the stores, which makes shopping less enjoyable.
It was fine, we had spending limits set, but he was just learning he can't have everything he wants, a good lesson, but one you have to get through via whining.
At 2 or 3 .. they are pretty much locked into a stroller, but can get out and wait in line with ease, but they aren't old enough to REALLY complain yet or voice any opinions. For the most part they sit there quietly and take it all in with awe. Diapers aren't a huge deal, and in some ways make bathroom breaks more predictable. Though we did have a blowout and the spare change of pants we thought we had in the bag wasn't there .. so ya .. my son was running around DHS in just a diaper for a few hours
.
As for the stores, when they are that young, they don't care if you get them a balloon or a giant stuff animal at the store. ONE item (make your own lightsaber) was enough to satisfy him for the whole trip.
In reality .. there is no best age .. as long as they go .. like you said .. before the magic wears off and they become that roll your eyes teenager (that we all were at one time when going on family trips).