So two quick responses:
1) You can defined numbering within subsections as well. You need to change this line from:
2) What you want to do is not optimal to achieve on Overleaf. With so many tables it will definitely give errors compiling.
Here I would suggest you have LaTeX locally installed using MikTeX (https://miktex.org/download) and a compiler like TeX Studio:
Basically you need to write the file contents file in Stata. You can invoke loops within Stata and push the tables to the .tex file and compile the pdf.
Here are some examples of calling TeX from Stata:
I will also write a guide on local Stata-to-TeX compiling.