This is usually solved by two variables alone:
max_input_vars=5000
memory_limit=256M
Now you should be able to have unlimited amounts of custom menus in Wordpress.