Finding a I/O expander that supports 18 PWM outputs or another solution for MOSFET control
The inverter is built up of 3 half bridges, with 6 transistors per
half bridge, 3 on the high side and 3 on the low side.

OK so you basically have a requirement for 6 control lines that need to use PWM. Each PWM control line activates/deactivates 3 parallel MOSFETs yes?

My wish is to turn off some of the transistors when the inverter is
running at a low load to improve efficiency.

Then instead of using 18 PWM lines to control all 18 MOSFETs, use extra IO lines to disable some MOSFETs from activating; you'll still use 6 PWM controllable lines but now, instead of an extra 12 PWM controllable lines, you use logic IO lines to disable the 12 MOSFETs that no longer need to play a role.
The number of logic lines could be one i.e. if line=high then the extra 12 MOSFETs still receive PWM drive signals and, if line=low then those MOSFETs are disabled via their respective drivers.
You might want to do this in stages so you might want three extra control lines so that 1 bank, 2 banks or all 3 banks of MOSFETs can be disabled.