All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
May Allah reward you for your keenness on earning lawful earnings and avoiding what is unlawful; this is indeed the conduct of the true believer.
With regard to your question, a person is not allowed to do unlawful work or to help in doing it if he can avoid it, as Allah says (what means): {…but do not cooperate in sin and aggression.} [Quran 5:2]
Therefore, if you can refrain from doing work that has any connection with applications for places of liquor and brothels and other unlawful matters, then there is nothing wrong in that work, otherwise you must leave it and look for another job.
You should know that if someone leaves something for the sake of Allah, Allah will compensate him with something better. Indeed, Allah promised to grant pious people good sustenance. Allah says (what means): {And whoever fears Allah - He will make for him a way out and provide for him from where he does not expect. And whoever relies upon Allah - then He is sufficient for him.} [Quran 2:3]
It is not permissible to continue in a work that requires direct help in what is unlawful, except if one is obliged to do it such that if he leaves it, he will not find the necessities of life such as food, drink, and accommodation. Hence, if you are compelled to this extent, then it becomes permissible for you to do this job until you find another job, for the general words of Allah (which mean): {…while He has explained in detail to you what He has forbidden you, excepting that to which you are compelled.} [Quran 6:119]
Based on this, if you do not have any other source of income to provide for yourself and your family except this job, then you may continue in it while earnestly trying to find another permissible job where you will neither engage in doing what is unlawful nor help in it.
Reproaching oneself and fearing to commit what is unlawful and regretting it is evidence of having a heart and faith that are alive, and you did well by fearing to consume what is unlawful or to bring it into your home, as this has evil consequences. The Prophet said, “Flesh that grows from unlawful earnings will not enter Paradise.” [Ahmad and others] It is also a cause that prevents the supplication from being answered.
Allah knows best.