First: edit the icons attached to the exe (CFF explorer or other similar software)

The second at least can be done with Spider Monkey by adding a listener to the keys pressed. It's absolutely a hack, and the key shortcut added is global (i.e. it works even when foobar window is not active). As a workaround when pressing alt+tab the listener is disabled. It's an experimental feature, blablabla..
https://hydrogenaud.io/index.php?topic=120978.0
At .\scripts\SMP\xxx-scripts\main\playlist_tools_menu.js

Add this:
close: {keys: 'Esc', mod: [], val: VK_ESCAPE, menu: '', func: () => {fb.Exit()}},

Load 'buttons_playlist_tools_menu.js' or '_buttons_merged.js' or '_buttons_mergedV2.js', and enable global shortcuts at config on the Playlist Tools button (read the warning).
PD: I would add a modifier like pressing shift too, to avoid possible problems, just in case:
close: {keys: 'Esc', mod: [VK_SHIFT], val: VK_ESCAPE, menu: '', func: () => {fb.Exit()}},