If you can modify the config, you can modify the rest of the application.
It boils down to proper access permissions and running the application always with least privileges.
The core of Log4Shell is the unexpected or little known behaviour of the library to contact remote services.
Usually, I would expect from a configuration file to hold static read only data, not fractions of code that could be
executed - and that's also unexpected or little known Log::Log4perl behaviour.