On a macbook pro, option key just gave me a ƒ symbol, both in Terminal.app and Ghostty. Anyways, if that was meant to be alt and it requires setup to work, then it's not worth the effort.
Terminal.app has a setting "Use Option as Meta Key" that needs to be enabled. It's under the Edit menu as well as in Settings > Profiles > Keyboard (if you want, you can click use Command-A to select all the profiles to apply the change to all of them at once). Ghostty will have a similar option.
Also surprised you haven't encountered this earlier, given it affects all usage of Alt in the terminal.
Never had a reason to use alt or F-keys; I deliberately avoid them because they're not easily accessible by all terminals. Only programs I've seen these days use it are emacs and this edit program.
[1] https://github.com/apple/container