Sony was able to get 99% of PlayStation games to work on PlayStation 2.
Sony was able to get 99% of PS1 & PS2 games to work on early models of PS3.
The situation with playing Xbox 360 games on Xbox One was different, and went beyond mere licensing restrictions.
As I understand it, Xbox One does not actually emulate the Xbox 360. The systems have rather different architectures, so the Xbox 360 executables are recompiled into different code that the Xbox One understands. This is why you can't simply "pop in the disc and play" like you could with PS2, PS3, Wii, etc.--the system needs to download the recompiled binaries (which aren't contained on the game discs).
This is also the reason why Microsoft's approach with Xbox One is not considered true "backward compatibility"--the disc merely acts as a validation key to download a recompiled version of the game. If the recompiled code doesn't exist on Microsoft's servers, then the game won't play.
Presumably, the PS5 situation is somewhere in between the PS2/PS3 approach and the Xbox One approach, but much closer to PS2/PS3. The PS5 architecture is similar to that of PS4. Inserting a disc into the PS5 should cause the PS5 to act like a PS4, so that it copies the files directly from the disc and/or downloads whatever updates it needs from the network. Some games might have enhanced updates available for the PS5, but the game shouldn't need to be "recompiled" in order for it to work at a basic level.
The litmus test here will be to see what happens when you take a PS5 system, don't connect it to the Internet, and then stick in a game disc. Ideally, it should install the game and play in the same way that a PS4 system would.