Now double the density (but keep the speed of individual air molecules
the same). Fill the box with 2 million molecules, but keep the average
speed of the molecules the same. Will it record the same temperature?
The actual temperature of the gas will be the same prior to making a reading, but the final temperature of the gas and thermometer after making the reading will depend on the heat capacity of the gas before and after doubling the number of molecules as compared to the heat capacity of the thermometer (fluid plus glass), which is fixed.
If both before and after doubling the number of molecules the heat capacity of the gas is much greater than the thermometer, then the actual temperature of the gas should not change due to the act of measurement, and the thermometer reading should not change.
Let's say the heat capacity of the gas is $C_H$ and the heat capacity of the thermometer, is $C_L$. Before making the measurement the actual temperature of the gas is $T_H$ (higher temperature) and the temperature of the thermometer before making the measurement is $T_L$, (lower temperature). Then the final equilibrium temperature $T$ of each will be
$$C_{H}(T_{H}-T)=C_{L}(T-T_L)$$
Now let the heat capacity of each before doubling the molecules be equal, or $C_{H}=C_{L}$, then
$$T=\frac{(T_{H}+T_L)}{2}$$
Now we double the number of gas molecules but the pre-measurement temperature is the same $T_H$. But the heat capacity heat of the gas is now double that of the thermometer, or $C_{H}=2C_L$. The final equilibrium is now
$$T=2/3T_{H}+1/3T_L$$
Which is higher than before doubling the number of molecules and is closer to the actual pre-reading temperature of the gas, $T_H$.
The more molecules you add the closer the final equilibrium temperature of the thermometer is to $T_H$, until the heat capacity of the gas is so much higher than the thermometer that the addition of more gas at the same pre-measurement temperature has no effect on the final temperature of either one. If there are 1000 times more molecules than the original then $$T=\frac{1000T_H}{1001}+\frac{T_L}{1000}≈T_H$$
The above said, keep in mind that in order for a thermometer to measure the actual temperature of something (i.e., the temperature that something has before applying the device), the heat capacity of what is being measured must be much greater than the heat capacity of the liquid (and glass) of the thermometer so that the temperature of what is being measured does not change.
It is kind of a cardinal rule in making any measurement that the act of making the measurement should have a minimum effect on what is being measured. If doubling the amount of gas having the same pre-reading temperature gives you a different temperature reading, then perhaps you are using the wrong temperature measuring device.
Hope this helps.