That's exactly what google phones do. They are far ahead on this front.
I bought an iPhone this time around because I wanted to play with lidar and because google defaulted hard on the "free picture storage" promise. There's a lot to like about the iPhone, but anti-spam is a glaring exception. Holy shit, I assumed that Apple would at least have made an effort, even if wasn't their core expertise and the result wasn't quite as good as google's, but it's like they didn't even try. Meanwhile google put this into production years ago and they have iterated and tuned it to the point that the spam problem is almost completely buttoned down.