Are infinite groups in which most elements have order $\leq 2$ commutative?
Let $G$ be an infinite group in which the set of elements of order $\neq 2$ has cardinal $<|G|$. Then $G$ is 2-elementary abelian.
Indeed, by contradiction, let $g\in G$ be of order $3\le d\le \infty$. So the conjugacy class of $g$ has cardinal $<|G|$, and hence the centralizer $C_g$ of $g$ has order $|G|$, and in turn, the set $C_g^{(2)}$ of elements of order 2 in $C_g$ has cardinal $|G|$. Then for every $h\in C_g^{(2)}$, the element $gh$ does not have order 2 (as $(gh)^2=g^2h^2=g^2\neq 1$). Since $h\mapsto gh$ is injective, this produces $|G|$ elements of order $\ge 3$, a contradiction.
As an alternative approach with the same solution:
Given $g\in G$, I will show that $g$ is of order $2$ (or $1$). From here on, a subset of $G$ is "large" if its complement is of lower cardinality than that of $G$.
Let $G^{(2)}$ be the set of elements of order $2$. Then $G^{(2)}z$ is large, so $G^{(2)} \cap G^{(2)}z$ is large. We can therefore choose $x$ such that $x, xg$ are both of order $2$.
Similarly, we can find $y$ such that $y, z:= yxg, xy, xz = xyxg$ are all of order $2$. Then by the usual proof, $x, y, z$ all pairwise commute and are of order $2$, so $xyz = xyyxg = xxg = g$ is of order $2$ (or $1$).
Interestingly, this approach should be easy to adapt to measure theory, leading to a conclusion of the form: Let $G$ be a group with a finite one-sided invariant finitely-additive measure (and assume the measure is normalized to $1$). Then if the set of elements of order $2$ is measurable with measure larger than $c$, the group is commutative and every element has order $2$. The limiting step in the above proof is the choice of $y$, and there are $4$ conditions on $y$, so $c = \frac{3}{4}$ should work. Considering the dihedral group of the square, in which $6$ out of $8$ elements are of order $2$ or less, $\frac{3}{4}$ should be optimal.
Here is a slight modification of YCor's solution, which is too long to describe in a comment. It is proved in the same way.
Claim. Any identity $w(x_1,\ldots,x_n)\approx 1$ which hold almost everywhere in an infinite group must hold everywhere.
Here, an $n$-ary identity $w\approx 1$ holds almost everywhere in infinite $G$ means the solution set $S\subseteq G^n$ of $w(x_1,\ldots,x_n) = 1$ satisfies $|G^n-S|<|G^n|=|G|$.
Step 1. If $w\approx 1$ holds almost everywhere, then so does $w(x,x,x,x,\ldots,x) \approx 1$, and this has the form $x^k=1$ for some $k$ (possibly $k=0$). As noted YCor's comment to his solution, this implies $x^k=1$ holds everywhere. Thus we may assume that $w(x,x,\ldots,x)\approx 1$ holds everywhere.
Step 2. If $w\approx 1$ did not hold everywhere, then there would exist a tuple $t=(g_1,\ldots,g_n)\in G^n$ that does not satisfy it. Each conjugate of $t$ fails $w\approx 1$, so the index of the centralizer of $t$ is small, forcing $|C_G(t)|=|G|$.
Step 3. For each $h\in C_G(t)$ we have $$ w(hg_1,hg_2,\ldots,hg_n) = w(h,h,\ldots,h) w(g_1,g_2,\ldots,g_n) = 1\cdot w(g_1,g_2,\ldots,g_n) \neq 1, $$ yielding $|G|$-many failures of $w\approx 1$, namely all tuples in $C_G(t)\cdot t$. This is too many failures of $w\approx 1$, thereby contradicting the existence of even one failure $t$ of $w\approx 1$.