You have some flexibility and can eat a few low level NPCs as well. As long as you just don't go all willy-nilly you'll be fine. I ate 2-3 low XP targets (worth in the 1000-2000 XP brackets) in each district to keep up with the normal enemies and then toward the end ate a 3-4 high (5000) XP targets. In the end I was still outleveling the final boss by a few levels. Doing side quests, curing illnesses each cycle and trying to get all the clues gives you enough XP to put you ahead of the final boss scaling curve. The first time I ignored all of this, ate everyone in the end regardless of how much or little XP they were worth and ended up getting walled by the final boss.
As stated in the linked post, I think the optimal amount to be perfectly on the level curve is 6-7 but that locks you out of the good ending. The truth is that the game is really difficult enough, even on Hard, for it to actually be much of a bother except maybe at the beginning when you have very few tools available to you. From what I recall (this was three years ago, after all) playing on Hard difficulty and going pseudo-pacifist was actually kind of hard up until Whitechapel, but after that it's a breeze. You're behind the curve but it's only by a few levels at any given time. The only time after Whitechapel that I really got shocked by how much I was outlevelled was the Leon Augustin encounter in the West End sewers, but I think that's because I'd forged ahead of the story a little bit. A quick look at a wiki says he was Level 32, and I know that I'd started West End at Level 21, so I'd probably made it to...idk, Level 24 by then?