You can’t ship anything that is using editor parts of the engine, but you can share the changes to other UE subscribers (typically via a github fork). Otherwise you can always fork and modify the engine itself and use your fork for shipping games, just remember that sharing code from the engine itself can be only shared with other UE subscribers. Plugins that build on top of the engine that are your own additions and can be shared more freely, e.g. on the marketplace.
Regarding the problem itself, there is this: https://forums.unrealengine.com/showthread.php?53208-MMO-Starter-Kit which should be good for about 100 players.
Otherwise you need to shard. The main reason for this is that the bandwidth cost is exponential with the number of visible players. One way to mitigate this problem is to have logic to stop transmitting data when player’s can’t see/interact with other players, but even with that eventually you will hit a limit for a single server, so you shard to cover more players.
Classically sharding was done per ‘zone’ basis with a server for a region of about 100-200 players across zones (sometimes in busy zones, just one server per zone). In modern MMOs you can probably have a few more players per server, but the main difference is the need for seamless worlds and you can handle this with UE’s level streaming and have a small handoff region where it is connected to both servers.
In terms of the binding to UE, make a custom function library or component and consider having that master-slave network structured like a plugin, then you would use the functions exposed (e.g. to c++ or blueprint) to communicate with the master server as if it was another part of the engine. There shouldn’t be a need to actually modify the engine source with this approach.
For more complicated implementations read up about Eve’s architecture as they’re considered cutting edge for concurrent player count battles (2000+):