I remember using a forum software (can’t remember the name) and it had a setting that would annoy the user. For example, if a user is a spammer, you would turn on annoy mode for them and the user would receive blank pages, fake error pages, and random refreshes. I had tried it by enabling it on my account, and it would annoy you a lot of it was enabled 24/7. I would really like it to be added to Discourse to help get spammers away from your forum, because the spammer starts thinking that the forum is buggy and they don’t wanna waste their time on it.
You are talking about hellbanning here or the many other flavors (slowban, errorban and so on)
Have a search for the word hellban plenty of discussion in this topic.
No plans to build this at the moment.