When adding something, it adds more CEC attachment points, but also more cations and more hydrogen.
Within just the coffee grounds, many of the CEC points are occupied by hydrogen, so it is acidic. But when you compare the number of CEC points to that in the soil, the amount in your soil overwhelms. The good cations in your soil wont be affected much until you have enormous levels of coffee grounds (like >10% or something, I'd have to calculate it and I haven't).
And of course you can always just measure the pH and add cations which will displace the hydrogen (it will bond with the anion). Calcium is cheapest which is why people use agricultural lime. Dolomite will give you some magnesium which will probably produce healthier veggies. Potassium is important but too much will just bulk up the veggies rather than letting them develop more healthfully. Sodium is almost never useful.