Yes, but the heavy lifting required behind the scenes to make statecharts work seems quite elaborate, moreover it could be problematic to use blocking apis, like sockets etc with statecharts, perhaps?
On the contrary, in my experience such stateful APIs are a great use case for state machines. You just approach them differently. Instead of doing a blocking call, you introduce a "waiting for <something>" state. You leave the "blocking" state when the correct event comes, or after a timeout. And while you are waiting for the event, you don't just burn CPU cycles, but yield control quickly, so that other threads can execute in the meantime.
Additionally, you can use state machines server side to track stateful processes by simply serializing the “current” state of the machine and storing it somewhere.
With the next request, reload the “current” state of the machine and transition to the next based on the incoming request.
It’s easier when you write your application in Elixir or Erlang. Those are practically DSLs for state machines that also double as general purpose programming languages.