For me the ‘set trim’+‘interaction’ have never worked. And this long before the SU5 update.
Bind your encoder like buttons with ‘trim up’ and 'trim down", and adjust sensitivity, travel and speed in the Arduino program.
I have no knowledge for the Arduino interface, but perhaps you can simulate an axis for the trim like I do in my VKB Joystick software.
It offers me a virtual axis for up/down and even a reset to 0 button.
In MSFS this axis is bound to the trim axis.
I have no problem when disconnecting A/P because the value stays at the current position and not suddenly going back to the position given by an analog potentiometer.