Perhaps the most clear way to see what's going on is to compare the action
$$
S_1[\phi]=\int_{\mathbb R^d} \phi(x)^2\mathrm dx\tag1
$$
to the action
$$
S_2[\phi]=\int_{\mathbb R^d} x^2\phi(x)^2\mathrm dx\tag2
$$
The first one should be invariant under translations, while the second one should not.
We define the translation operator $T_a\in\mathrm{End}(\mathscr C(\mathbb R^d))$, with $a\in\mathbb R^d$, as (ref.1)
$$
(T_a\phi)(x):=\phi(x-a)\tag3
$$
With this, an action is invariant under translations if and only if
$$
S[T_a\phi]\equiv S[\phi],\quad\forall a\in\mathbb R^d\tag4
$$
What follows is a standard textbook exercise:
$$
S_1[T_a\phi]\overset{(1)}=\int_{\mathbb R^d} (T_a\phi)(x)^2\mathrm dx\overset{(3)}=\int_{\mathbb R^d} \phi(x-a)^2\mathrm dx=\int_{\mathbb R^d} \phi(y)^2\mathrm dy=S_1[\phi]\tag5
$$
and
$$
S_2[T_a\phi]\overset{(2)}=\int_{\mathbb R^d} x^2(T_a\phi)(x)^2\mathrm dx\overset{(3)}=\int_{\mathbb R^d} x^2\phi(x-a)^2\mathrm dx=\int_{\mathbb R^d} (y+a)^2\phi(y)^2\mathrm dy\neq S[\phi]\tag6
$$
where in both cases we defined $y:=x-a$. This is the expected result: $S_1$ is translation invariant, and $S_2$ is not.
Note that a very similar computation shows that both $S_1$ and $S_2$ are invariant under Lorentz transformations $T_\Lambda\in\mathrm{End}(\mathscr C(\mathbb R^d))$, with $\Lambda\in\mathrm{SO}(1,d-1)$, defined in the obvious way: $(T_\Lambda\phi)(x):=\phi(\Lambda x)$. Here, and as before, it proves essential that $\mathrm dx$ is Poincaré invariant (indeed, it's the Haar measure of $\mathrm{ISO}(1,d-1)$), and that $x\mapsto \Lambda x+a$ is one-to-one over the integration region, $\mathbb R^d$.
But this doesn't mean that $\mathrm dx$ transforms under $T_a,T_\Lambda$. Symmetry transformations are defined at the level of the field $\phi$, with no reference to $\mathrm dx$. Indeed, the definition of invariance $S[T\phi]=S[\phi]$ is quite general, and it is not limited to local functionals: $S[\phi]$ could be any functional, not necessarily given by an integral. The volume form $\mathrm dx$ doesn't transform under symmetry operations1, and neither does $x$. The "arrows and primes" notation $\phi\to\phi'$ can be ambiguous and imprecise. If you stick to well-defined operations, the picture is rather clear.
In any case, and not to be mislead to think that invariance of the measure is necessary and/or sufficient for invariance of $S$, the reader should consider other symmetry transformations, such as: internal symmetries (e.g., the $\mathbb Z_2$ transformation $(T\phi)(x):=-\phi(x)$), and non-isometric external symmetries (i.e., conformal transformations). The simplest example of a conformal transformation is the dilatation
$$
(T_\lambda\phi)(x):=\lambda^\Delta\phi(\lambda x)\tag7
$$
with $\lambda\in\mathbb R$. The canonical example of a dilatation-invariant theory is
$$
S_3[\phi]=\int_{\mathbb R^d} \frac12(\partial_x\phi(x))^2-\frac{1}{n!}\phi(x)^n\ \mathrm dx\tag8
$$
which satisfies
$$
\begin{aligned}
S_3[T_\lambda\phi]&\overset{(8)}=\int_{\mathbb R^d} \frac12(\partial_x(T_\lambda\phi)(x))^2-\frac{1}{n!}(T_\lambda\phi)(x)^n\ \mathrm dx\\
&\overset{(7)}=\int_{\mathbb R^d} \frac12\lambda^{2(\Delta+1)-d}(\partial_y\phi(y))^2-\lambda^{n\Delta-d}\frac{1}{n!}\phi(y)^n\ \mathrm dy
\end{aligned}\tag9
$$
where I set $y:=\lambda x$. This equals $S_3[\phi]$ iff $2(\Delta+1)=n\Delta=d$, that is, $\Delta=(d-2)/2$ and $n=2d/(d-2)$ (which, for $d=4$, becomes $\Delta=1$ and $n=4$; i.e., $\phi^4$ theory in four space-time dimensions is scale invariant, as is well-known; more generally, $n$ is an integer only in $d=3,4,6$ space-time dimensions).
--
More generally, let $\phi\colon\mathbb R^d\to V$, with $V$ a finite-dimensional vector space. We say $T\in\mathrm{End}(\mathscr C(\mathbb R^d,V))$ is a symmetry of a functional $S\colon\mathscr C(\mathbb R^d,V)\to\mathbb R$ if
$$
S[T\phi]=S[\phi],\qquad\forall \phi\in\mathscr C(\mathbb R^d,V)\tag{10}
$$
It is typically the case that symmetry transformations are coordinatised by some manifold $\mathcal M$, so that $T\colon\mathcal M\to \mathrm{End}(\mathscr C(\mathbb R^d,V))$. Moreover, we assume that $T_0=1$, with $0\in\mathcal M$ the origin of $\mathcal M$ and $1$ the identity transformation.
In this case, there is a weaker notion of symmetry: we say $S$ is quasi-invariant under $T$ if the directional derivative of $S[T_x\phi]$ vanishes at the origin of $\mathcal M$:
$$
\lim_{t\to0}\frac{\mathrm d}{\mathrm dt}S[T_{vt}\phi]=0,\qquad\forall \phi\in\mathscr C(\mathbb R^d,V)\tag{11}
$$
for some $v\in\mathrm T_0\mathcal M$. The pushforward (differential) of $T$ at the origin is usually denoted by $\delta$:
$$
\delta_v=\lim_{t\to0}\frac{\mathrm d}{\mathrm dt}T_{vt}\tag{12}
$$
with components $\delta_v=v^a\delta_a$, with $a=1,2,\dots,\dim\mathcal M$. Quasi-invariance is therefore equivalent to
$$
0=S[\phi+t\delta_v\phi]-S[\phi]=tS'[\phi]\cdot\delta_v\phi+\mathcal O(t^2)\tag{13}
$$
where $\cdot$ denotes summation-integration, and $'$ denotes a functional derivative. Noether's first theorem is precisely the statement that there is a current for every quasi-symmetry of $S$, which is divergenceless whenever $\phi$ satisfies $S'[\phi]\equiv 0$.
Finally, it bears mentioning that usually $\mathcal M$ is a homogeneous space for some Lie group $G$; in which case we say that $S$ is invariant under $G$. If $G$ is connected and compact, then we can reconstruct it from its algebra $\mathfrak g=\mathrm T_1G$ by means of the exponential map. This algebra is generated by $\delta$, and therefore quasi-symmetry implies symmetry, and vice-versa. If $\exp$ is not surjective, then quasi-symmetry is truly weaker than symmetry.
References:
- Bogolubov, Logunov, Oksak, Todorov - General principles of quantum field theory, §7.1.C.
1: Here we are advocating for a passive point of view, as opposed to an active one. Internal transformations are always passive, so it is convenient to regard external ones as passive to, so as to have a uniform framework. It appears that the books OP is following introduce a mixed point of view, where both the fields and the spacetime point are allowed to vary, if somewhat redundantly. The passive point of view is, IMHO, the most general and clear one, and the one most people use nowadays.