In fact, the research shows that greater certainty of getting caught acts as a deterrent, not the sentence that comes afterwards.
What also acts as a strong deterrent is the compelling moral influence of people who mean something to the offender. Disapproval and denunciation, coming in a personally meaningful way from the community, the family, and the victim, make sense.
But all the research says the arbitrary use of a jail sentence to send a message out there does not make any difference. It makes it worse.