Intercom is the most expensive chat support solution. It costs $39/mo. Other solutions like Casengo (€29/mo), GoSquare ($49/mo), Freshchat ($19/mo.), HelpCrunch ($15/mo.), and Olark (also $15/mo.) are good options but might not be as feature-rich as Intercom.
I couldn’t find any open-source alternative, although there is one cloud-based free option (if you keep their powered by Tawk.to brand message).
If you want to go with the “build route”, you have AWS Connect, an omnichannel customer service tool. Its price is $0.004 per message.
Of course, you will need to hire a developer to build the integration with your site (see this demo from VoiceFoundy’s.)
Based on this post, a simple chat might take around 8 hours of development, priced at USD50, which is a one-time payment of USD400. If you take the cheapest chat solution in the market ($15/mo.), that is ~2 years until you get your money back.
Don’t worry too much about the cost per message, it is hidden in the paid tools anyways: they will charge you per seat and per active chat user. You will end up paying more if you use it more (like in AWS Connect.)
My advice is that if chat support is an operational cost for you (i.e., you occasionally need to reply to customer request), go with a paid solution. Go through at least two tools trial periods, and pick the one that you feel the easiest to manage (you want to keep your support cost at a minimum.)
If your sales depend on the chat support, then build your custom solution. Start with something simple using AWS Connect, and then evolve to a more robust solution with phone call support, even with a conversational Chatbot AI like AWS Lex.
Each small development contribution to your custom solution will turn into more business/sales for you.