It is worse than that before 1917, most numbers were actually
battalion numbers. So in a regiment like the Liverpools the same number was used about nine times before WW1. The regulars, who were in the 1st or 2nd Battalions (or on the permanant staff of the other part-time battalions), had one sequence, while the eight Militia/VB battalions had their own sequences.
This didn't matter before WW1 as only the regulars tended to switch battalions, and if a part-timer did they were simply re-numbered.
Between 1914 and 1917 another dozen or so number sequences were introduced, and (worse) men regularly switched battalions to make up the numbers in hard-hit battalions. A renumbering of the territorial battalions was carried out in 1917 -
http://www.1914-1918.net/TF_renumbering_infantry.htm7-digit unique army numbers were introduced in the early 1920s, and officers were numbered and 8-digit numbers were introduced in the 1930s.
Regimental numbers were introduced in the 1820s to prevent fraud by officers claiming pay and rations for men that did not exist.
4 digit numbers will run out after the 9,999th man. So in an army of 7 million, the same number would have been used 700 times if something wasn't done, and 70 times for 5-digit numbers.
Ken