Teaching high school before PhD
You have reason to be concerned about the reasons you give. It is possible to keep in touch. It is also possible to publish some things while you are otherwise working, but it is very difficult.
I doubt that teaching secondary school will give you any advantage in a doctoral program unless it is in a school of Education or in a program that is otherwise focused on producing teachers. Such exist, of course.
You can &quot;fall back&quot; to secondary teaching even without the prior experience, so that doesn't seem to be an advantage.
If your long term goals include a doctorate and you have the means to do so, then I think it is a (big) mistake to put it off unless there are other considerations not raised here.
Most places (not all) the cost of a doctorate is paid in some way. In the US, most students are TAs. In other places there are other arrangements. Also, in the US, you have some time at the start of a program to decide on a specialty.
You lose noting by applying and exploring the options directly, even if you do so in parallel with other possibilities.
But if your goal is really teaching secondary school, then an MST (Master of Science in Teaching) is a good choice.