The point of putting an excommunication penalty in place is to emphasize to the person who might commit the sin, or who has committed the sin, that what they are doing is seriously wrong and needs to be corrected. In a society where abortion is legal and many approve of abortion, the excommunication penalty served the purpose of emphasizing that the Church regards it as a grave wrong.
In the case of rape and murder, there’s no need for an excommunication penalty to let people know the wrong is grave. People in general, including non-Catholics, non-Christians, non-religious and atheists, all know that rape and murder are gravely wrong acts, and society has strong laws against them (whereas abortion is legal and condoned by much of society).
The point of excommunication is not to punish someone, the point of excommunication is to let the person know they committed a wrong that needs to be corrected so they hopefully correct it and return to the Church. People always think of excommunication as an ultimate punishment when that’s not the point, as Canon Law Made Easy blog has noted.