This. This is the most important thing you can do.
TBH it does not really matter whether a punishment is related, makes sense, or is arbitrary because none of that makes a punishment more or less effective. It is not that effective anyway - the main effect of punishment is to sort of "underline" the disapproval of adults, which for a NT child will be the significant part anyway, because social approval/disapproval is a HUGE driver of behaviour in the vast majority of children (and people of all ages).
Sometimes also punishment/reward can separately be helpful to sort of tip the motivation balance, e.g. if it's really obvious that they are doing something because they are getting something out of it, and you want to balance that out to reflect the inconvenience or harm caused to you/others. I don't think this is that situation - but if he is gaining social approval, bravado or status by using violence, then it could be part of it.
But mostly, punishment is not that effective on its own so the most important things are to keep it temporary and small. The main deterrent is social disapproval, and most children experience punishment as social disapproval in itself, making it basically irrelevant what the actual punishment is.
What you can do sometimes is if you have a sort of "standard" punishment like loss of some kind of privilege, if there is a behaviour which crosses a very clear line or you want to make a really big point about, then either the very first time it happens, or the first time after you've had a serious talk about it, you can try making the incident "memorable" by either removing a larger privilege (e.g. all screen time rather than one specific screen) or increase the duration (e.g. usually lost for 30 mins but this time lost for a week) - the point of this is essentially shock value, with the idea being that on rare occasions you want to make a really big fuss, which has the effect of not only underlining the social disapproval part but also metaphorically highlighting it, using capitals, red pen and several exclamation marks - basically hoping to instill a memory of "Holy shit, I had better not do that again!"
Note that I am not talking about using fear, emotional cruelty (e.g. going for a sentimental or beloved item) or violence. I do not think those things are helpful, particularly for discouraging violence. I also think it is almost always a bad idea to give any kind of punishment which is permanent, e.g. missing out on something that they will never get the chance to do again, or losing something outright with no chance to earn it back. In some cases it might make sense (e.g. the school trip makes sense) but I do think most of the time esp for parents, if you have an urge to do this, put some time/space between the urge and actually doing it because it might be more of a revenge urge and revenge doesn't make for an effective punishment, it just fuels conflict and feeling misunderstood, and since punishment doesn't actually do very much on its own, the last thing you want is to create distrust between you, because whether you use a big punishment, small punishment or none the thing that will actually change behaviour long term is helping your child solve the problem they were trying to solve with the unwanted behaviour, in a better way, and they need to trust you for that.
Hence, you can only really do the "memorable" thing once, maybe twice at a push. If you do that all the time, it loses its value (and you will run out of things to take away, which defeats the point). Also - if you try the "memorable" thing, or even standard normal punishments and behaviour continues or worsens, then increasing the punishment is highly unlikely to work, and basically it makes sense to downgrade back to a temporary/token punishment so that it remains repeatable, or drop it temporarily because you need to do more on the problem solving or relationship building side instead, or look at where you are (what your child is doing now) and where you want them to be (what you want them to do instead) and break this down into smaller steps and work on one at a time. If this still does not work, break the steps down even more.
People often have this idea that punishment is like a magic hammer which can squash behaviour, with more effectiveness the bigger you make it, and that is not really the case, because behaviour does not happen out of nowhere. It's more like a pressure valve - it creates pressure behind the behaviour, but the behaviour didn't happen out of nowhere and so there's likely pressure from another direction as well. If you don't find it a safe route to escape and just keep adding more pressure from your side, it's going to explode somewhere and probably cause some damage.