An easier way to achieve this using a raspberry pi would be to simply have the pi press the right button on the garage remote. I took a pass at this a few years ago. Compared to messing with larger electronics, it’s a much easier setup.
Would you need extra electrical components? The cool thing with the garage remote approach is that you don’t need any extra electronics, just plain microcontroller.