If you are serious about high performance networking at scale, you use software defined networking stacks, where you access the NIC directly from userspace, instead of OS level sockets. There are a lot of libraries out there mimicking the socket API but without all those restrictions and much faster. There you don't have the limitation with 50k sockets but can have as much as the memory in your system allows. That said port numbers are restricted to 65k, so you may need additional disambiguation, but nothing impossible, and already widely used for very high demanding Network Services.
That said, Microservices don't solve the state problem, they are simply stateless. And this isn't really new, LISP already was a stateless language in the 50s, and there were some attempts to leverage lisps homoiconicity to implement distributed computation models, as at any point the whole program state can be represented as a lisp program, all operations are just transforming one lisp program to another, therefore all subexpression s can be split up, evaluated independently and concatenated back together.
The most interesting use case probably was some work for implementation in Browsers, where the lisp program would be transparently split up in server and client subexpression s that are evaluated independently and then rejoined to build a full web app. Note that this was around the same time JavaScript was developed, where the word Microservice did not yet exist.
Similarly functional languages often have similar properties through pure functions which have been heavily used to write parallel programs. Erlang was completely built around this concepts, where your functions are basically their own processes that can only communicate through well defined parallelity safe channels. Today go picked this idea back up with their go routines.
Note that this is pretty much the exact same thing as "Microservices" are today, but because the earliest versions of this came from the 70s (ML) and Erlang became big in that area in the 90s, it wasn't called a Microservice back then.
Microservices are just distributrd computation with a new fancy name to sell it to management. Nothing about that ia new, it's just recycled ideas from the past 70years.