Percolation renormalization group analysis of confinement in $\mathbb{Z}_2$ lattice gauge theories