I don’t get many legitimate texts from numbers I don’t know, so I can usually tell without opening it that it is a political fundraising text (“Hi, Roderick, this is a name you’ve never heard of. I think you should know…”). I not only block these but don’t open them. I don’t know if that really makes a difference, but it seems like I have been getting a lot fewer of them since I started doing that.
I have not donated directly to any political parties or candidates, so my having received these texts is not based on that. I am registered Independent, but almost all the texts are pro-Democrat (probably because I live in California).