You don't need $8$ pairs of $\pm$ charges. $4$ pairs of $\pm$ charges is enough to create a $\frac1{r^5}$ potential (see approach 1).
If you really want to use $8$ pairs of $\pm$ charges, see approach $2$ (based on ideas metioned in question).
Approach 1 - placing charges on unit circle on a plane.
For integer $n > 0$ and $k = 0,\ldots,2n-1$, let $\alpha_k = \frac{k\pi}{n}$ and $q_k = (\cos \alpha_k,\sin \alpha_k,0)$.
Place a charge $(-1)^k$ at each $q_k$. At point $p = (x,y,z) = (r\sin\theta\cos\varphi,r\sin\theta\sin\varphi,r\cos\theta)$ where $r > 1$, the potential of these charges equals to
$$\Phi = \sum_{k=0}^{2n-1} \frac{(-1)^k}{|p - q_k|}
= \sum_{k=0}^{2n-1}(-1)^k\sum_{\ell=0}^\infty\frac{|q|^{\ell}}{|p|^{\ell+1}}P_\ell(\hat{q}_k\cdot\hat{p}) = \sum_{\ell=0}^\infty \frac{1}{r^{\ell+1}} f_\ell(\hat{p})$$
where $P_\ell$ are Legendre polynomials, $\hat{p}, \hat{q}_k$ are unit vectors in directions of $p$, $q_k$ and
$$f_\ell(\hat{p}) = \sum_{k=0}^{2n-1} (-1)^k P_\ell(\hat{q}_k\cdot\hat{p})$$
In order for these to be a $\frac1{r^{n+1}}$ potential, we need $f_0,\cdots,f_{n-1}$ identically zero while $f_n$ doesn't.
Let
$$g_\ell(\hat{p}) = \sum_{k=0}^{2n-1}(-1)^k (\hat{q}_k\cdot\hat{p})^\ell
=\sin^\ell\theta \sum_{k=0}^{2n-1}(-1)^k\cos^\ell(\alpha_k-\varphi)
$$
Since for each $m$, $P_0(t),P_1(t),\ldots P_m(t)$ form a basis for polynomials in $t$ with degree $\le m$.
This condition on $f_0,\ldots,f_n$ is equivalent to $g_0,\ldots,g_{n-1}$ identically zero but $g_n$ doesn't.
For $\ell < $n,
$$\require{cancel}
\begin{align} \sum_{k=0}^{2n-1}(-1)^k\cos^\ell(\alpha_k-\varphi)
&= \sum_{k=0}^{2n-1}\sum_{s=0}^{\ell}\frac{(-1)^k}{2^\ell}\binom{\ell}{s}e^{i(\ell-2s)(\alpha_k - \varphi)}\\
&=
\sum_{s=0}^{\ell}\frac1{2^\ell}\binom{\ell}{s}e^{-i(\ell-2s)\varphi}\sum_{k=0}^{2n-1}(-e^{i(\ell-2s)\alpha_1})^k\\
&=
\sum_{s=0}^{\ell}\frac1{2^\ell}\binom{\ell}{s}e^{-i(\ell-2s)\varphi}
\color{red}{\cancelto{0}{\color{gray}{\frac{1-e^{i(\ell-2s)(2n\alpha_1)}}{1 + e^{i(\ell-2s)\alpha_1}}}}} \\
&= 0
\end{align}
$$
So $g_0,\ldots,g_{n-1}$ do vanish identically. For a similar expansion in $s$ for $\ell = n$, most terms cancel like above. There are only two exceptions, $s = 0$ or $s = n {}^{\color{blue}{[1]}}$. The end result is
$$g_n = \frac{4n}{2^n}\sin^n(\theta)\cos(n\varphi)$$
doesn't vanish identically.
As a result, the potential from placing $n$ pairs of $\pm$ charges on vertices
of regular $2n$-gon on unit circle in $xy$-plane is a $\frac{1}{r^{n+1}}$ potential:
$$\Phi = A_n \frac{\sin^n(\theta)\cos(n\varphi)}{r^{n+1}} + O(1/{r^{n+2}})$$
where $A_n = \underbrace{\frac{1}{2^n}\binom{2n}{n}}_{\color{blue}{[2]}}\frac{4n}{2^n} = \frac{n}{4^{n-1}}\binom{2n}{n}$
For our case $n = 4$, $4$ pairs of $\pm$ charges on vertices of regular octagon gives us a potential with leading behavior
$$\frac{35}{8}\frac{\sin^4(\theta)\cos(4\varphi)}{r^5}$$
notes
- $\color{blue}{[1]}$ - when $\ell = n$ and $s = 0$ or $n$,
$$e^{i(\ell-2s)\alpha_1} = e^{\pm\pi i} = -1 \implies
\sum\limits_{k=0}^{2n-1}(-e^{i(\ell-2s)\alpha_1})^k = \sum\limits_{k=0}^{2n-1} 1 = 2n \ne 0$$
- $\color{blue}{[2]}$ - coefficient of $x^n$ in $P_n(x)$.
Approach 2 - placing charges on projected vertices of a hypercube.
For an $n > 0$, let $V = \{ -1, 1 \}^n$ be the set of vertices of hypercube $[-1,1]^n$. Let $\eta_1,\ldots,\eta_n$ be any $n$ non-zero vectors in $\mathbb{R}^3$. For any $v = (\epsilon_1,\ldots,\epsilon_n) \in V$, let
$$q_v = \sum_{k=1}^n \epsilon_k \eta_k\quad\text{ and }\quad
\epsilon_v = \prod_{k=1}^n \epsilon_k$$
By placing a charge $\epsilon_v$ on each $q_v$, we obtain a configuration of $2^{n-1}$ pairs of $\pm$ charges. Let $\Phi$ be its potential. Let $R = \sum\limits_{k=1}^n |\eta_k|$, it is clear all $|q_v| \le R$. At point $p$ where $r = |p| > R$, we can expand $\Phi$ like what we have done before:
$$\Phi = \sum_{v\in V}\frac{\epsilon_v}{|p - q_v|}
= \sum_{\ell = 0}^\infty \frac{f_\ell(\hat{p})}{r^{\ell+1}}
\quad\text{ where }\quad
f_\ell(\hat{p}) = \sum_{v\in V} \epsilon_v \underbrace{P_\ell(\hat{q}_v\cdot \hat{p}) |q_v|^\ell}_{*1}$$
Expand $q_v$ in $(*1)$ in terms of $\epsilon_k$, it is not hard to see $(*1)$ is a polynomial in $\epsilon_k$ with degree at most $\ell$.
Since $\epsilon_v = \prod_{k=1}^n \epsilon_k$, if $\ell < n$,
$(*1)$ doesn't have enough $\epsilon_*$ to make all
$\epsilon_k$ have even power. As a result, their sum over $V$ vanishes. This means $f_0, \cdots, f_{n-1}$ vanish identically.
If one do the same thing to $f_n(\hat{p})$ and carry out the summation over $\epsilon_*$, one obtain a horrible mess.
I'm not going to write down the actual mess. The only thing we need is following:
If one let $\tau_k = \eta_k\cdot \hat{r}$, then $f_n(\hat{p})$ is a polynomial in $\tau_1,\ldots,\tau_k$ with degree $n$ and has the form:
$$f_n(\hat{p}) = 2^n n! (c_0 \prod_{k=1}^n \tau_k + O(\tau_*^{n-2}))$$
where $c_0$ is the coefficient of $t^n$ in $P_n(t)$.
Choose a coordinate system where none of the $\eta_k$ is parallel to $z$-axis and set $\hat{p} = (\cos\phi,\sin\phi,0)$ to be points on unit circle of $xy$-plane. For any $\eta_k = (x_k,y_k,z_k)$, we have
$$\eta_k \cdot \hat{p} = x_k \cos\phi + y_k \sin\phi = \frac{x_k-iy_k}{2} e^{i\phi} + \frac{x_k+y_ki}{2}e^{-i\phi}$$
Substitute these back into $f_n(\hat{p})$, one find on the unit circle,
$f_n(\hat{p})$ is a linear combination $e^{in\phi},e^{i(n-1)\phi},\cdots,e^{-in\phi}$.
If $f_n(\hat{p})$ is identically zero, then it need to vanish on the unit circle. This in turn require all coefficients of $e^{im\phi}$ to vanish. However, the coefficient for $e^{in\phi}$
is $n!c_0\prod_{k=1}^n(x_k - y_ki) \ne 0$, this means $f_n(\hat{p})$ doesn't vanish identically and hence $\Phi$ is a $\frac{1}{r^{n+1}}$ potential.
As a concrete example, set $n = 4$ and all $\eta_k$ to $(0,0,1)$,
following configuration of charges:
$$\begin{align}
& +1 \text{ charges at } (0,0,2), (0,0,-2),\\
& -4 \text{ charges at } (0,0,1), (0,0,-1)\\
\text{ and } & +6 \text{ charge at } (0,0,0)
\end{align}$$
give us a $\frac1{r^5}$ potential.