Is having a specialised PhD topic a pitfall when applying to be a lecturer of STEM education? [with teaching and research duties]
I would not call it a "pitfall," per se, but rather you'll have to do some convincing that you're qualified to research in the field of education. I applied for a couple of similar positions (with somewhat similar experience and education as you, though with about half the number of years teaching high school), and the guidance I received was that I needed to demonstrate that I had a "research arc" (or research strategy) that was consistent with the research goals of the position. Having a good deal of teaching experience may have given me an edge as far as the teaching duties were concerned, but I only had one publication in the education pedagogy realm, and that (among other things, presumably) was not enough to make me competitive for the positions (i.e., I didn't get the jobs). In fact, it probably was the case that most applicants for such a position spent time teaching at the secondary level, and my experience there was a wash.
Bottom line: if you are asked to write a research statement, make sure it is highly targeted towards the position, and try to have a long-term approach to the research question or questions you discuss. Relating it back to your hard-science degree may be difficult, so leverage as much of the teaching experience you can to inform the statement.