Slapping and screaming at him gets him to leave you alone like you said, this only removes Matts further main sexual content and doesn't remove content from other characters so if you really hate him that's the way to go to not have to deal with him. Screaming is the most effective as that just removes any possible further harassment from him all together. That is how you get rid of him, or do you mean you want him to keep showing up but you don't want him to show up doing anything sexual, because if so he does still show up in some random school events but that's it. If you're on about ways to actually deal with him when on his route he has the most by far. You can:
- Slap him or scream at the start of the game
- Refuse to meet him in the bathroom then when someone spills drink in your hair don't shower it off
- Befriend the mafia in the karaoke walk around events and then get them to deal with him on day 36 after his pet play scene
- Tell Nathan about him and then take him up on his offer to deal with him.
- Go down any other main route (Nathan, Damien, Violet, Kate, Bar, Bakery) and choose them over Matt in the conflict scene which will have them deal with him in some way or another.
- Delete the pictures off his phone and literally knee him in the balls