I once created and played a game on a 1024x2048 map. I played for more than 100 turns without crashing. However, there was severe lag between turns and the save files were ~90MB each. A game on a 5000x5000 map would have even more lag and the save files would be ~1GB (!).
However, I doubt that you could load a 5000x5000 map. Are you certain that you have actually created maps of that size? If you're using the Custom Map Size option in setting up a game, the largest map that you can create is 256x256, no matter what parameters you input. To see this, start a new game and create a custom 5000x5000 map. In Custom Game Rules, deselect the
No Unity Survey: World Map not visible option. Now start the game and scroll down to the bottom left corner of the map. You will find that the coordinates of the tiles will never exceed (511, 255), which indicates a 256x256 map.
It
is possible to create larger maps. See
this article for instructions on how to do so.
Finally, are you playing SMAC or SMAX? SMAX has other problems with really large maps, which I can explain if that's what you're playing.