I was a piano technician for 5 years back in the day, so maybe I can answer this question for you.
First, since digital pianos are reproducing actual sound sampled from acoustic pianos, those sounds should reflect the tuning of the instrument used for the sampling. So if the acoustic piano used in sampling had stretched octaves in the treble, so would the digital.
A tuning starts by setting the temperament -- which means tuning one or two octaves at the center of the keyboard, then tuning up and down the keyboard in octaves from the temperament to tune the rest of the instrument. On an equal temperament, every interval has some distortion from pure (ideal being beatless intervals). In the temperament octave (usually from F3 to F4), fifths are very slightly flat, fourths are a little sharp (more than the fifths are flat), and major thirds have a lot of beating that is supposed to progress smoothly from 7 beats/sec. for the F-A third to 11 beats/sec. for the C#-F third. That's why playing a major third in the middle of the keyboard will sound like the interval has vibrato. It's the beats that have been put there on purpose. In order to achieve nearly perfect fifths and fourths, the thirds and sixths are compromised a lot.
So once the temperament is set, the rest of the piano is tuned to these notes. E.g., F#4 is tuned to F#3 (an octave lower in the temperament range). Theoretically octaves are tuned beatless (for reasons of string physics I won't go into here). However, tuning totally beatless octaves throughout the entire treble doesn't necessarily produce the most musical sound. And it varies from piano to piano. In general, very large pianos can be tuned more perfectly than small pianos (there is less string inharmonicity when the strings are longer) -- but even on a 9' piano, beatless octaves will not produce a sound that is pleasing and musical. Beatless octaves tend to make an instrument sound "dead."
Most tuners stretch their octaves as they move up the treble away from the temperament. The amount of this stretching is very subtle and slight, amounting to maybe a beat every 2-3 seconds. Some tuners just build in this stretch, but most rely on checking the octave against other intervals (especially to the third, where the beats are so distinct). Ultimately the tuner balances octave stretching against the overall sound of the instrument. The general philosophy is the less stretching, the better, but some stretching is usually needed to prevent the piano from sounding "dead," which is how totally beatless octaves sound.
Tuning from the temperament octave down into the bass is an entirely different matter. The farther you go down in the bass, the more the tuner must rely on tuning not just to the second partial (the octave), but also to other, higher partials. The third partial is an octave plus a fifth and the fourth partial is two octaves. These partials are relatively easy for most experienced tuners to hear, but some tuners claim to be able to hear through 7 partials. The reason these higher partials are used is because the tone produced by bass strings is rich and strong in partials, so to get a truly musical tuning, these partials must be taken into account. So the octaves in the bass are not so much stretched as they are adjusted to produce the most pleasing, resonant tone when played with chords that contain the higher partials in the treble. So, for example, if you're tuning C2 to C3, you might also play the inverted C major chord, G3-C4-E4 along with the octave and listen to how C2 resonates with C3, G3, and C4. This is an oversimplification, but basically what tuners do.
Hope this helps!