you could filter out all "data" transactions
Which means filtering literally all transactions. There are already settings for that, you can just receive new blocks, and stop relaying any transactions at all.
you may "catch" some valid P2MS, P2PK etc. transactions without data if your model is not precise enough
Not "may", but "will", because people can store data in their private keys, and use weak signatures, to allow going from public to private key (it would have spamming efficiency of around 1/3 in the worst case, which means wasting 3 MB of block space, to put 1 MB of any payload on-chain; and only non-spammers will process these 3 MB, because spammers can compute everything out of this 1 MB in deterministic way). And it works across all chains, including Grin and Monero.
Also, in case of Monero, it can be used to deanonymize some traffic, if you interact with other users. Then, some user could mix some UTXOs with your coins, and you can break someone else's privacy, if for example 19 out of 20 keys are weak. Then, it is quite clear, who sent what, and where, because all weak keys can be easily detected, and stripped, so the real payment can be revealed to everyone.
The rest could be filtered out by using explorers like the Stampchain explorer.
That's the main problem of spammers: they don't care about "private inscriptions", which are cheaper, and which are as hard to censor, as the regular payment is. Because if users would legitimately want to use Bitcoin to commit to some JPEGs, then they could do so in a better way, than by pushing easily-to-detect, non-consensus data. A single public key can commit to gigabytes, if users would want to. And Ordinals are possible even in a system, where only P2PK is allowed.
This could later be enhanced into a tool which almost replaces a full node and could be used for alternative clients to sync the blockchain only with financially relevant data, ignoring data txes.
In general, you don't have to process anyone's transactions, except your own. As long as you can get external proof, that the chain is valid, and validate it properly, you can just sync the block headers, verify your own transactions, and if you have a proof, that the whole chain is correct, then your transactions also are, as long as they are just included in it.