| something I'd do for fun for learning - Yes. The answer that comes above is good from web specs pov (or theory in general), otherwise it's not, as it complicates things.
All major langs already have good support async/await, and where is not requirement to rewire your brain to use it. Also, you don't have to write a lot of lines to dealing with websockets, just take lib which build on top of websockets.
Anyway. If you need chat with simple feature set (1 to 1, text, imgs), then, as mentioned below, it is not hard to write it in just two weeks max.
Otherwise, for chat with some specific feature set, it is actually better to buy one.
We are not expecting a huge traffic as we launch, if the heap size is an issue we can always buy a bigger for now.
When the cost are exceeding $200/month, it will probably be a better solution indeed to change the technology to be memory efficient and async.