I wonder if OP considers your suggestion a solutionThere is a 48 port switch. It just takes up 2 U. You have to order it as three pieces and do some self assembly. There are only two part numbers.
2 - https://mikrotik.com/product/crs328_24p_4s_rm
1 - https://mikrotik.com/product/SplusDA0001
Or are you really just asking for a 1u - 48 port switch? You may want to be specific.