You are technically right that the water heater softens the water a bit by precipitating the minerals around the heating element and thereby removing them from the water. But that is energy inefficient and expensive, since you normally don’t use a water heater to soften your water but rather to get warm water. So putting another system in front of the heater that softens it first is better than replacing the heat element every so often.
Vinegar is perfectly fine for that. With a bigger amount of minerals you just need more vinegar and time.