Robocalls are a huge pain but just as annoying is non-stop spam text messages. No idea why Apple doesn't allow for keyword filtering. Spam and robocalls are mostly nonexistent problems on Android.
It's not perfect/ideal, but you can basically accomplish keyword filtering using a shortcut powered by a message automation. I've done something similar where during the political season I would have all incoming texts (from unknown numbers) run through an LLM to determine if it was a political message. If so, it'd get deleted immediately.