Great question Kristian, and something that I wanted to do recently also! There's a different way of solving the problem, than preventing a capability - you need to think about it as override permissions on a resource / activity.
I don't believe there is a way to prevent teachers from editing topics (topic names) without restricting too much, BUT you can create a label with the information that you want in it, then modify the permissions on that particular label.
By going into settings, then looking in the Label Settings -> Permission, you want to override the permissions of: "Hide/Show activitiy" and "Manage Activity" to remove teacher from these roles.
See the screenshots for how I have acheived this. This means that Teachers see the label, but can't edit / delete it. Only managers will be able to do that!
Hope this helps!