I had exactly the same issue on mine & i’d replaced the chainrings & set the indexing corrrectly too. The drivetrain was worn so that was the reason to replace it all, the skipping in 2/3/4/ & 5 was happening before the drivetrain replacement, & the damn thing was still happening afterwards. It would only happen though, when putting a lot of pressure through the pedals, i.e. going uphill, or having to plough through a techy section.
So, replaced the inner & outer cables, set the indexing perfectly & guess what??
It still did it! FFS!!
A further inspection revealed one tooth was broken off on the top jockey wheel. Fitted a spare & problem soLved!! 🙂
So not saying that will cure yours, but worth checking the jockey wheels ime.
EDIT:P20 summed it up in one line!