I remember 3.9 LTS, especially its quiz engine, underwent deep optimizations. Then it was rewritten in Moodle 4. Therefore I don't believe the old optimizations are valid any more. Moode 4 was a new beginning and the quiz engine is still evolving along the 4.x versions. I haven't found any performance comparisons between 3.9 LTS later releases and say Moodle 4.1 LTS. So whether 4.x quizzes performs better than the 3.9 LTS quizzes is an open question.
Unless the OP comes up with some numbers, we can't be specific.