Uniforms do not have numbers in WebGL. Those numbers in your debugger are something assigned by the debugger. How it numbers them is up to the debugger. It could number them by querying them. If so they'd get different numbers across implementations. They'd also change if you change the shader. It could number them based on the order you use them. If so, then you setting different textures would also number them different.
Uniforms are almost always optimized out if they are not used so if you stopped using a particular uniform then again the debugger you're using might number them differently.
As for limits, as you already checked there is a limit to the number of texture units and you can bind a different texture to every unit so your 6 textures is well under the limit.
For uniforms the limit is queried via gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS)
for vertex shaders and gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS)
though it's unlikely you're hitting that limit because you'd get an error trying to compile the shaders.
Note: how many uniforms you can actually use from that number is defined by the packing algorithm. See this answer
As for why your code is not working you'd have to post a repo (in the question itself) for us to figure that out.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…