I’ve got several replies to this topic on the other social platforms, which I would like to address.
Yes, that’s true, but they may not be available for another 8 months or a year. And we still have to finish this season with many teams running into 8 legacy port limit on V5.
Well, that is not what we are trying to do here. Most likely you are going to need only 3 or 4 switches on your robot and it is nice to use a single port to connect them, instead of taking up half of the available legacy ports.
Here is a diagram of the contraption shown in OP for connecting three buttons / switches to a single port :

Another useful scenario would be to piggy back one or two switches to the analog sensor already connected to one of the 3-wire ports:

In this scenario you could tweak potentiometers to get two non-overlapping ranges for the analog sensor measurement: one for button being on and one for off. For example, if full analog port resolution is 12-bit with values from 0 to 4095 then you could get something like 300-1600 when button is pressed and 2600-3700 when it is not.
I used screw method to tie Y-cable wires into the common rails because it is easier to visualize how they all would be electrically connected. It is true that you could damage the pins if not careful. Lucky to us there is a much simpler method that needs no screws and is guaranteed to pass the inspection:

Notice how Y-cable connectors are plugged back into themselves shifted by one position. Wires of each color align with wires of the adjacent color therefore electrically connecting all of them together.