How to configure the F9 Fn (display switch) key?

Fn+F9 is mapped to Super+P, yes. For Framework Laptop 13, the relevant code is at a different location depending on generation:

Hacking your Framework Laptop's EC for fun and profit :: HowettNET is a helpful blog post on modifying the EC code. It only covers hx20 and hx30; it mostly also applies to azalea, but the toolchain setup is a bit different and I’m not sure it’s properly documented. I assume marigold is roughly the same as azalea but I’m not sure if anyone outside Framework has actually tried building the EC firmware for it yet.

If you just want to make it emit a different set of scancodes it should be fairly clear how to do that. Properly making it correspond to the XF86Display keysym would be ideal but is more difficult. The corresponding HID control is “System Display Toggle Int/Ext Mode”, but you’d have to modify the descriptors and reproduce the hid_consumer logic yourself since that’s in the Generic Desktop Controls page as opposed to Consumer Controls.

If you go ahead with the latter, I know there’s other people who would be interested too. Perhaps you could even PR it upstream? I don’t know why they wouldn’t accept it, though admittedly I don’t know for sure that Windows handles that control equivalently to Super+P.