Looking at England middle-order batting averages since the last Ashes tour by position, (names in brackets only have 1 or 2 innings in that spot):
At 3: Root 50, Ballance 46, (Ali 5)
At 4: Root 53, Ali 51, Ballance 6, (Stokes 31), (Bairstow 15),
At 5: Root 76, Bairstow 32, Ali 30, Ballance 27, (Stokes 5)
At 6: Bairstow 57, Stokes 38, Ali 18, (Root 77)
At 7: Ali 68, Bairstow 63, Stokes 26
At 8: Woakes 30, Ali 28, Rashid 25, Dawson 21, (Bairstow 58), (Stokes 0)
At 9: Ali 37, (Stokes 0)
If "average by position" has any significance there's a case for pushing Ali up to 4 with Root at 5, Stokes at 6, Bairstow at 7.