> The DRAM bits themselves don't change at all. What's different between DDR4, DDR5, and HBM is the IO interface
That's not completely accurate - since the bw between these are different, the routing and therefore propagation delays for DDR4 won't allow it to magically be used as DDR5 or HBM.
If you design for the most strict timings, then sure.