Not every pejorative is racist or ableist.
If you can't link the word to a disability and its etymology has never been used to refer to disabled people how is the word ableist? Stupid is not a judgement on a person's overall mental capacity it is a judgement on their actions or words in a situation. A "stupid person" is someone who consistently does or says things that they should know better than to do or say. Like how a drunk person has poor judgment, because they are in a "stupor."
Cracker isn't a slur either. It is class and ideologically based insult not a racial one. Crackers are poor people who uphold white supremacy wile getting little of the benefits. It was a self imposed title for Irish immigrants who drove slaves despite being non-white themselves at the time.
If a table is wobbly and doesn't have a flat top it is a bad table. If an idea isn't based on material realities and lacks logical consistency it is stupid. A person who's ideas constantly have those issues is not intellectually impaired but they are stupid. Stupidity can be cured.