In $1+1$-dimensional space-time, Gauss's law implies that
$$\int\ \vec{E}\cdot{d\vec{A}}=\displaystyle{\frac{Q}{\epsilon_{0}}} \implies 2 E =\displaystyle{\frac{Q}{\epsilon_{0}}} \implies E =\displaystyle{\frac{Q}{2\epsilon_{0}}},$$
where the factor of $2$ comes from the two endpoints of the Gaussian 'surface' with the charge $Q$ at the centre.
So, $$V=-\int\ \vec{E}\cdot{d\vec{r}} \sim -Qx,$$
where $x$ is the distance from the charge $Q$ and hence is necessarily non-negative.
Now, consider the charge configuration where two massive charges $+Q$ are separated by a distance $d$ and a light charge $-q$ oscillates in between the two massive charges. The light charge $-q$ is attached to one of the massive charges $+Q$ via a spring which causes the oscillation of the light charge $-q$.
So, $$V(x) \sim x^{2} + |x|,$$
where $x$ is the displacement from the equilibrium position.
Why is the electric potential energy a function of the absolute value of the displacement of the light charge $-q$ ?