No, it’s not political. It’s based on their blatant opposition to Church teaching, their promotion of policies that contradict Church teaching, and the fact that as persons in power and with leadership duties, they are misleading others (aside from the damage done by their votes for abortion).
Kings in the past were excommunicated over disputes with Church authorities for this same reason. It only affects things that relate to Church teaching, not to, say, policies on economics or something that falls into the secular political area.
Other public persons in unrepentant error, such as theologians, are publicly excommunicated for the same reason.
The Roman Catholics are absolutely correct on this point. Abortion is murder. It should not be sanctioned nor should anyone who supports it be given communion (without prior repentance). There are dark forces at work in this world that must be opposed.