Hi Jeffrey
Basicly this is possible.... But you have to check out some things.... ( I not see a Encoder like this until now)
1. You have to know HOW Your encoder workes.... I don´t know the Encoder you show us on the picture.
A Standard Encoder with ONE Shaft and ONE Pushputton got 5 Pins ... ( Encoder A - Encoder B - GRD Encoder - Switch +5v - Switch GRD )
Your photo shows it have 9 Pins. .... That can have lots of different reasons.... If its a DUAL Encoder ( With 2 individual shafts) ? Or maby it´s a Encoder that have 2 Layers and can controll two different circuts..... Maby it work for Encoder with additional 5v ..... Maby it´s a 4BIT Encoder instead of 2 Bit like we use with mobiflight !
Same with switch.... Maby it´s a Push AND Pull Button ( witch would explane the additional pin there)
So... YOU Have to find out WHAT Encoder you have and how it work ..... If Possible find out the exact name and search for a data sheet.... There you see all the information you need to set the Encoder ( and you see if the encoder can basicly work with Mobiflight at all).
Otherwise you have to Test the encoder (Multimeter or a LED Testboard) to find out WHAT Pin is controlling WHAT Function .
2. The Software Part.....
When your encoder workes then you can simply set a Input Command to every Function ( Left Right/ Button Push/ Button Release).
Here the qeustion is... What Simulator (FSX P3D Xp11) and what aircraft ( Standard or a AddOn) . Normaly everything should be possible.... But in some AddOns it can be much more difficult.
Summary.... If you have fun with elctrical Stuff and testing/research then check out your Encoder..... If Not and you just need a simple Encoder with a Push Button i would recommend to buy a standard one..... That is Plug&Play and work after 2 Minutes perfectly.... For example this...
https://www.reichelt.de/?ARTICLE=73923&PROVID=2788&wt_mc=amc141526782519998&gclid=EAIaIQobChMIvLuwzPCz1gIVipPtCh0UbgDhEAYYASABEgK27_D_BwE
If you need more help... Just ask !