All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The One Who forbade the Muslims to help each other in sin is the One Who permitted them to deal with the non-Muslims in selling, hiring, gifting and similar transactions which they may use as a means to what is forbidden. For instance, a Muslim who rents his home to a non-Muslim knows that he will consume intoxicants in it, or that he will practice a forbidden act of worship in it, even though, there is nothing in the Sharee’ah which prohibits renting houses to non-Muslims, let alone what is of less seriousness like what you mentioned in the question.
Therefore, the sequence that you mentioned in the question is not correct at all, but the sin is only in direct help, like the one who sells grapes to someone whom he knows or predominantly thinks that he will squeeze it for making intoxicants, or the one who sells weapons for someone whom he knows that he will use them in transgression, and the like.
Allaah Knows best.