If a writer has two books published in market/category A (middle grade, for example) and Book 1 did well but Book 2 didn't, is the writer in the same unenviable position as today's OP if (drumroll) she CHANGES TO MARKET/CATEGORY B (romance, for example)? Assume this individual actually writes well for the second, completely different market, and is not merely changing out of desperation.
As is your habit, woodland creatures, you are obsessing here. I fear I bear some responsibility for this with my dire thoughts about what happens when Book #2 tanks.
Sales figures are not like job qualifications. Publishers can and do overlook sales figures on previous books any time they want to. Unlike when you've applied to be a
That said, the fewer things a publisher has to work around, the more they like it. Thus our preference for clean slates, debut authors, and so forth.
You can't worry about this or you'll paralyze yourself with fear. Write the very best book you can. That's the ONLY thing you can control right now.