I recall my beloved teacher, Lillian Freundlich, teaching me how to play singing tone, legato octaves through a process that separated the upper fingers, 4 and 5, from the lower thumb progressions. She would not advance to the actual octave spread until voicing between upper and lower notes was separately clarified and each line was practiced with shape and contour.
As it happened her approach to lyrical, Romantically framed octaves had direct application to several measures of Chopin's Nocturne in E minor, Op. 72, No.1 where the composer elaborates the opening theme in octaves.
In short, through my slow practicing phase, I would imagine I had NO thumbs when I floated fingers 4, 5, 4 etc. in a horizontal direction, incorporating crescendo-s, diminuendo-s, etc. followed by a featherlight thumb journey imbued with rolling wrist forward motions.
When I finally played the octaves as notated, I prompted myself with an invisible thumb image, so I would relax my hand and not think of STRETCHING to the octave, or grabbing the octaves but, instead, I yielded to the upper voice in a floating modality.
While my hand easily navigates the eight note span, I still steer my attention to the upper fingers that can create a legato line autonomous of the thumbs. (Even small hands can learn a technique of relaxation that makes octaves feel smaller than they appear if the thumbs are not rigid or tense.) Yet there are instances where a student can feel comfortable using all 5's in the octaves, and still create an ILLUSORY legato with a relaxed, thumb-lightened approach. He/she must above all thread the notes with a SINGING TONE.
If I fast forward to the present in my mentoring universe, I always add a bit of mental imagery to the mix.
"FLOATING" prompts assist smooth connections between notes, and in the case of the Chopin Nocturne, there's no doubt that a seamless voyage in TWO, rather than 4, (with triplets as the underpinning), helps to avoid bumpy playing.
The pedal as a finishing touch, can obviously promote legato octaves but it cannot substitute for the technique of connecting the upper notes with horizontal, contoured, and relaxed transit.
For demonstration, I made a supplementary video for a student that focused on pertinent measures of the Chopin composition previously referenced.
Original Content: Piano Technique: Playing Lyrical Legato Octaves