I have just added a second answer to the referenced question https;//tex.stackexchange/questions/38851 If this question had not been closed as a duplicate I would have added that answer here, also dealing with the lack of subsection numbers in the ToC..
– Peter WilsonOct 03 '21 at 17:28
subsectionnumbers in the ToC.. – Peter Wilson Oct 03 '21 at 17:28