There is no way to tune your guitar so that all the successive open fourths (and the one major third) are pure, without the high E being quite off pitch relative to the low one.
But, unless you mainly play stacked fourths, why would you make it a requirement? You can, for instance, tune instead to get pure fretted fifths between adjacent strings, and fretted octaves between strings one removed.
The real reason you can't get your guitar in tune is one which makes none of the above matter. Most guitars don't have good intonation. Most acoustic guitars don't have movable saddles to set intonation at the bridge. Electric ones do. For accurate tuning, you need not only compensation at the bridge, but also at the nut.
https://guitarnutcompensation.com/
On my main axe, I installed a small screw next to the nut, right under the G string. Just doing the G string makes a huge difference!
Here is a test: play an open D power chord (open D, A on G string, D on B string) it is very clean. Now release the A to play a 1-4-8 G power chord (open D, open G, D).
On my compensated guitar, both of them are crisply in tune. Without nut intonation, one of the two will have ugly beats. If you tune one, the other goes wonky.
When I first heard how good it is after putting in the compensating screw, I was astonished and at the same time filled with the regret of not having done it decades earlier.
Why the G? The unwound G string on electrics is the most susceptible to bad intonation at the nut, because it undergoes the greatest pitch change when it is fretted. Guitarists like to bend that one for the same reason. Fretting it at the first or second frets makes it go markedly sharp; for that reason we need to shorten the distance between the nut and the first fret to get that sharpened interval back down to a semitone.
This is less of a problem on guitars with a wound G, which has a lot more tension in it to compensate for its weight, and doesn't pitch-bend nearly as easily.
> You can, for instance, tune instead to get pure fretted fifths between adjacent strings, and fretted octaves between strings one removed.
No, you can’t. If you tune so that octaves with one string between are correct everywhere on the neck, that will force the tuning to be 12 tone equal temperament, and a fifth in 12 TET cannot be a perfect fifth.
It doesn't matter how good the intonation at the bridge or nut. There's the mathematical fact that we cannot get pure thirds and even fifths in modern equal temperament system. If you have a good ear you'll feel the subtle difference between notes, and they can never get exactly where you want. It's something you have to live with in modern music.