  Electronic nematicity, the breaking of the crystal lattice rotational
symmetry by the electronic fluid, is a fascinating quantum state of matter.
Recently, BaNi$_2$As$_2$ has emerged as a promising candidate for a novel type
of nematicity triggered by charge fluctuations. In this work, we scrutinize the
electronic nematicity of BaNi$_2$(As$_{1-x}$P$_x$)$_2$ with $0 \leq x \leq
0.10$ using electronic transport measurements under strain. We report a large
$B_{1g}$ elastoresistance coefficient that is maximized at a temperature
slightly higher than the first-order triclinic transition, and that corresponds
to the recently discovered tetragonal-to-orthorhombic transition. The reported
elastoresistance does not follow the typical Curie-Weiss form observed in
iron-based superconductors but has a much sharper temperature dependence with a
finite elastoresistance onsetting only together with a strong enhancement of
the incommensurate charge density wave of the material. Consequently, the
$B_{1g}$ elastoresistance and the associated orthorhombic distortion appears
here as a property of this incommensurate charge density wave. Finally, we
report and track the hysteretic behavior seen in the resistance versus strain
sweeps and interpret its origin as the pinning of orthorhombic domains. Our
results revise the understanding of the interplay between nematicity, charge
density waves and structural distortions in this material.
