To be pedantic, 5000 people logged in is not "5000 connections". They could all be reading pages of information (Moodle is doing nothing), or they could all be doing a high stakes quiz (smoke is coming out of the servers). Which is why your question is impossible to answer.
However, some notable omissions are shared storage for 'moodledata' (probably some sort of NFS server) and a cache server (probably Redis), both of these need to be shared between your application servers.
The best plan is to do a limited pilot of whatever it is you are doing and measure stuff for yourself.
Oh - and at the time of writing, no Moodle version is compatible with PHP 8.2.
The best plan is to do a limited pilot of whatever it is you are doing and measure stuff for yourself.
Oh - and at the time of writing, no Moodle version is compatible with PHP 8.2.