Agree.
I would like to correct it though. you CAN place the flags yourself like, to tell the NPCs which house to live in, BUT you indeed CAN'T place the flag in a specific place inside the house where you want it. it seems it just gets placed at random. (actually, something seems to determinate it, but I'm not quite sure what. like, NPCs prefer to be near a light source, and also like if they can sit, so, if there's one chair and a light source nearby, they'll usually get assigned there, but if there are multiple, then it seems to be more random)
now as for the detection range... yes, it's 25 blocks now, which is ridicolously small, IMO. it was initially like this, then it was increased to 50 - which allows a bit more freedom with builds, though this needs clever placing of houses and some luck with where the flags get placed inside the house. - however for some reason (maybe related to overcrowding) it was changed back to 25, so, now you again have someone live in someone else's bathroom...
however if it was changed back, there was probably some reason they did that, like player feedback saying it's bad. If it would meant even more overcrowding detection, it does sounds bad. but I wonder, how it would work, to have their overcrowding detection stay 25 blocks, and have their neighbor detect range be 50, or more (like 75, which would allow more freedom, like, even if the flags get randomly placed in the other side of a long room)
but, maybe the best would be some sort of way, to allow the player to set it. between some sorts of numbers, so, not something like you could set it that they detect someone 50 000 blocks distance as neighbor XD probably. but it could easily be 50, 75 or 100 or something, that sounds like actual neighbors in houses next to each others, without them occupying each other's bathroom XD
And have a separate slider to set the overcrowding detection range, so it won't cause NPCs to think that the place is overcrowded, if you're set to detect neignbors who aren't right in front of them, but 100 blocks distance or something.