The C language (C17 5.2.4.1) only guarantees that 4095 different macro identifiers in a single translation unit are supported. If you have more macros than that, your code is non-portable and may not compile.
You can only solve this by better program design, by splitting huge .c files into several and localize macros that don't need to be exposed outside that .h/.c file pair.
For example, you could have a public header, which is implemented in two .c files where one .c file contains the function definitions for the public API and the other .c file contains internal functions. Have this second, private .c file include it's own .h file with macros that the caller need not know about, or alternatively place the macros inside that private .c file.
Also, avoid a somewhat common but very bad practice of creating a "super header" which in turn includes every other header file in the project. Not only does that risk blow the preprocessor, it also creates a tight coupling between every single, unrelated file in the project. Such a design is completely unacceptable for critical systems.