Maybe we should talk about intonation before thinking about hardware?
It is not the fixed target that many would like to believe. I am convinced that intonation in an absolute sense went south when the well tempered scale was introduced. Basically there are two schools of thought on intonation of major chords: accept heterodyning or not. This phenomenon is also called resultant tones, sum&difference tones or intermodulation. Resultant tones happen whenever two different frequencies occupy the same acoustic space. In a major chord, it is possible to tune so that all of the resultant tones are in that major chord. If we tune a piano like this, exactly one key is "good", 2 or 3 more are tolerable and the rest is VERY problematic.
The rest of the notes around the chords are subject to the direction that the melody is pointed in. There is musical gravity that makes us deal with leading tones differently than others. The E that we use in an in tune C major chord is considerably different than the E in A major or in a F#7 chord.
Trumpets are built with resonance in mind. Some call this "slotting". For the physicist, the term slotting is painful, because exactly the opposite happens. The resonant peak is not a slot to fall into, it is a small mountain. Its strength is defined by the term "Q". Where the resonances are (Pedal C, C, G, C, E, G, Bb, C, D, E, F#(sort of),..... depend on the acoustical, not the physical length of the instrument. If the trumpet was a simple tube with no leadpipe or bell, the length would be significant. Because it does have both as well as a cylindrical section, the resonances do not fall mathematically evenly. The proportion of conical to cylindrical changes based on how many valves that we depress. This means that the intonation is not consistent throughout the valve combinations. This fact alone applies to every valved trumpet on the planet. To allow the player to compensate for the physical state, the artisan builds "inefficiencies" into the instrument that allow for various degrees of manipulation.
This should be enough to get anyone interested started. At the top of this section of the forum, I have a thread "How a trumpet works" with far more links and detailed explanations.
To round this up, there are techniques to build better intonation. They start with controlled duet playing with someone at least as good as you are, better partners speed up development.