Don’t use an analog control bound to elevator trim axis. You’ll have problems when disconnecting A/P because the pot will send it’s physical position, wich is the one before connecting A/P (or anyone if you moved the trim with A/P connected).
This doesn’t happen with an encoder.