I have total understanding and totally get your difficult decision.
I have faced an almost identical one recently.
My old job was the best job I've ever had, such a nice place, both such flexibility and two minutes from school. I did it while both my boys progressed through primary.
I've now moved to a job where whilst I am working 8 till 4, which is great hours as other posters have said, but there is zero flexibility and actually quite an unpleasant toxic environment.
So, I would think very carefully.
Plus I'm a totally different stage: my youngest is just about to finish primary, whereas your oldest is finishing primary, but your youngest is just about to start the whole school thing!
yes it's different when they're at secondary, there is practically no parental involvement during the day, you only have to go to in, Year 7 or Year 10 evening meetings, which is totally different.
but if your youngest is just about to go through the whole school system then you will want the flexibility: if they're ill, you need to pick up, or a Christmas assemblies and sports days etc.
so I think this needs very careful thought.