I understand that an ion-thruster will continuously charge its spacecraft with a charge opposite of the one of the ions it thrusts. Over a long journey this charge would be considerable. What would happen when such a spacecraft comes in contact with another celestial body? Do engineers need to come up with a mechanism to dissipate the charge in a controlled manner?
Equalizing the charge of an ion thruster is a real problem. It is not possible to eject only positive xenon ions over a long time. The space craft would charge negatively and ions would be "pulled back" to the spacecraft.
To avoid this, also negative electrons are ejected to neutralize the spacecraft and the ion beam. There is a special electron ejector besides the ion ejector. The sum of the related electrical currents of charged ions and electrons should be zero to avoid a increasing charge of the spacecraft over time.
See Why are Ion Thrusters so energy hungry? for a picture of an ion thruster with the electron injector.
Ion drive spacecraft need to eject a net neutral amount of charge. Otherwise, the spacecraft would become so charged that the ion exhaust would just be sucked right back to the spacecraft. It takes an absurd amount of voltage to charge something by only a small net amount of missing ions.
Neutralization is done by mounting electron emitters on the spacecraft, which operate while the ion drive operates and spray an equal amount of electrons in roughly the same direction as the ion drive exhaust.
These may be simple hot-filament cathodes much like those in vacuum tubes and electron microscopes, or a variety of other designs including ones that operate on the cold-cathode principle.