My midi controller (hotone ampero, very cheap) also merges midi so I have the Yamaha MD-BT01 going from the FM3 midi out into the footcontroller and from the footcontroller back into the FM3. Couple of CME short leads and F-F midi adapters keep the MD out of the way.
So, check if your controller does merge first!
I did use to have a standalone midi merger but found out the hotone doesn"t need one. That went FM3 out to MD BT01, MD into merger, hotone also into merger and merger back into the FM3. Mine was that really cheap doremidi from aliexpress. Works fine.
Now if the footcontroller needs feedback from the fm3 you would indeed need a splitter coming from FM3 into the MD and the footcontroller.