This doesn't work on Overleaf, but locally this setup has saved me quite some time:
% Tikz caching (use make -f main.makefile to rebuild figures).
\usetikzlibrary{external}
\tikzexternalize[mode=list and make,prefix=tikzcache/] % Comment out this line to disable caching.
\newcommand{\includetikz}[1]{%
\tikzsetnextfilename{#1}%
\tikzpicturedependsonfile{#1.tikz}%
\input{#1.tikz}%
}
I would have all Tikz sources in a tikz/ directory, and include them where needed using e.g. \includetikz{tikz/foo}. Then the above would add an extra step to the compilation (make -f main.makefile), but in return all images would only be recompiled as necessary and otherwise included as a cached .pdf.