Personally, I think 5 or 6 for the first visit. (I voted 5 because, knowing what I know now, I don’t know if I could hold out ’till 6)
Our younger daughter was 6 on our first visit (her siblings were 3 and 9). They all loved it, but at 5 or 6 it is magic… there is wonder, they can get around easy, afternoon naps are gone, they are probably tall enough to go on the big rides, and they will remember some of it.
My now 10 – 16 year olds still LOVE WDW, and I don’t ever see the love for WDW going away for them, so the magic is continuing for us, thank goodness.
As for optimal age RANGE, I would probably say 5-10 years old. Anywhere in there is still prime. My 9 year old loved it just as much as our 6 year old that first year.