This complex modification rule for Karabiner-Elements will require fn modifier key to activate esc key. Useful for preventing accidental esc keypresses on Macs with a Touch Bar. Doesn't affect all other modifier combinations (i.e., option + command + esc works without requiring fn, too).
To import this "complex modification" rule into Karabiner-Elements, use the command:
open karabiner://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/sloanlance/e97722a69b4752efe9d77425d66006dd/raw/karabiner_require_fn_for_esc.json