12 buttons for P1 and P2? 6 buttons for P3 and P4?
What games are you playing that use that many buttons? 
I play old arcade games,PS1/PS2/PS3 games and Steam games as well.
Here is the layout:
P1/P2:
8 Action buttons (A,B,X,Y, Left Triger, Right Triger, Left Sholder, Right Sholder)
2 Buttons for Select/Start and Coin/Back)
2 Buttons for Right Analog Push/On Mame as a System Button, Left Analog Push/On Mame as Second System button.
I know i can use "shift button" on IPACs but i preffer to have dedicated buttons as there is enought space on the panel.
I will add Stream Deck for even more buttons :-)
I wish this joystick to share the buttons of Player 1 (that are connected to the IPAC Board 0)
The joystick itself have a mini-USB cable that you connect to the PC and a 9-pin connector - 1 Ground and 8 buttons.
I can connect the button cables to the corresponding buttons of Player 1, but what to do with the ground wire?
Do I daisy chain it to the buttons as well and have 2 grounds per button - one from ipac and one from ultimarc 360 or I don't connect it at all?
The easy answer is don't use the U360 encoder for buttons. 
In most emulator programs, you should be able to map the U360 analog joystick and Ult.I/O buttons to one player's inputs.
The main idea is when i play STEAM games to use the analogue joistick as it gives true 360 movement and not that limited movement of 8 way joysticks.
Also for bullet hell shooters it is better to use analogue as the directions are more precise.
There fore i need to use the analogue joystick as analogue and not as 8/4 way one.
If you are running a program that only accepts joystick and button inputs from a single device, you can connect one button to two encoders. You only need a single daisy-chained ground since both the U360 and the Ult. I/O grounds are connected via the USB cable ground. When you press the button, ground will be applied to both inputs which will trigger the related outputs from the U360 and Ult. I/O.
Button ____ U360 button input
switch |
Ground ____/____|____ Ult. I/O button input
Scott
And there is no problem that the ground line comes from a different device?
I can use the ground that comes from one of the IPACs and just not connect the one that comes from the Ultimarc 360?