Not sure how electricity smells. Do you mean a burning smell? That is more common.
It happens when the drill was used so much it got so hot that some of the material of the armature melted/burned. It doesn't mean your drill is permanently damaged, I've had this happen to a T15 of me and a DeWalt drill, and both were still perfectly useable. I still have the DeWalt drill now 12 years later and it still works. Sold the T15 to somebody who must be happy with it because I heard no complaints.
This is not supposed to happen to Festool drills, because they have an electronic sensor on board that is supposed to detect when a drill is over heating. But it happens anyway.
Funny thing is, if it happened once, the burning smell somehow stays forever even if there is no further burning going on. Or that's what I think at least.
There is nothing you can do about it except replacing the armature. In case of the CXS it means replacing the whole motor because it is one unit.