Correct! You'd wanna add this in the following section of that lua.
--------------------------------------------------------------------------------------
-- Special input for 3-pos 2-signals switches on joystick ----------------------------
--------------------------------------------------------------------------------------
{down = control_commands.ApPitchAlt_EXT, up = control_commands.ApPitchAlt_EXT, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 1.0, value_up = -1.0, name = _('Autopilot PITCH Switch - ALT HOLD/AP OFF AMS'), category = {_('Special For Joystick'), _('Instrument Panel'), _('FLCS')}},
{down = control_commands.ApPitchAtt_EXT, up = control_commands.ApPitchAtt_EXT, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = -1.0, value_up = 1.0, name = _('Autopilot PITCH Switch - ATT HOLD/AP OFF AMS'), category = {_('Special For Joystick'), _('Instrument Panel'), _('FLCS')}},
It will indeed get overwritten. But you can make it into a mod and then use OVGME for ease of enabling / disabling.