Sure ya can, prevent devs from being able to build them and prevent node operators from providing liquidity and you’re stuck with shitty on-chain wallets only.
Discussion
It is likely already illegal to be an lap, or perhaps even a channel counter party that routes. Yet here we are.
I don't think you can prevent devs from building non-custodial wallets. Just build it and put it out there without permission.
There's a lot of development and innovation that will make it even more resilient or give new use cases.
Ecash e.g. with Cashu and Fedimint.
lol who’s gonna run the mints if it’s illegal? And before you say “anonymous”, think hard about whether you want a future for bitcoin where everyone just uses anonymous custodians who can rug you at any point.