It's been a while but the last trackball I used only output 4 pins (2 for each axis). It didn't need an additional 5v pin. The Uhid board takes power from the USB port like all Ultimarc interfaces. The power for the 5v high / low for the optical axis movement is taken through the 4 pins you allocate to X and Y.
If optical circuits get the 5v operating voltage via the data lines . . .
1. Why is there a separate 5v pin on the Happ Optical "Red Board" and every other optical circuit I've ever seen?
2. How can the data lines forward bias the IR LEDs when both lines are at a logic low? (Phase 1)

Your assertion that data lines provide power to the optical circuits is
absolutely 100% factually and electronically wrong.

The four data lines (
outputs from the trackball optical circuits) DO NOT and CAN NOT supply the 5v (input) to power the IR LEDs and photodiodes/phototransistors in the optical circuits.
Every trackball that uses optical circuits and encoder wheels needs six connections:
- 5v / operating voltage
- Ground
- Four data lines (2X, 2Y)
it wouldn't have to come from the Uhid.
You're correct that you
can get the 5v from another source, but that hack would be unnecessary with a more suitable encoder like the I-Pac, Mini-Pac, or full-size U-HID.
I'm fairly sure it can be used for a trackball plus 4 buttons
As previously stated, the only non-hack way to do 4 or 5 buttons with just the Nano is to use shifted functions, which will almost certainly cause problems for this application.
- A standalone trackball controller needs at least 3 player buttons if you want to play Missile Command.
- Unless you manage to hack into 5v at the USB connection, the U-Hid Nano will only have 3 button inputs.
-- To do 4 or 5 buttons, at least one of the three player buttons will have to be either the designated shift button
or a shifted function(s).
-- There is no way to keep the shift button and the shifted functions separate from the player buttons.
-- Hitting more than one player button at the same time can trigger a different output than desired.
As stated earlier the U-HID series encoders are great, but they are
not the best choice for OP's specific application.
Use the right tool for the job.
Scott