I noticed after talking to Sturges for assistance with building... that thing you build... and then finishing the quest afterward, I was no longer able to assign Sturges to anything. He just sits around in the cafe I built, doing nothing. I had previously had him assigned to farming before all of that.
Mama Murphy could never be assigned to anything by me. She alternates between sitting in her chair, and banging on the wall of one of my houses with a hammer.
Sanctuary might be a weird case, just because it has so many named NPCs living in it.
Sturges has been my main guard since the beginning. I may have set him up on that before any missions. I think preston and possibly hancock may be straight bugged for me. not sure if mama Murphy does anything or how her quest will effect what you're trying to do.
I'm not sure what the deal is with Sturges as I have him tending six mutfruit. But Moma Murphy is a dud. In my game she just stands by her chair 24 hours a day, begging for some place to sit. I can't select her in workshop mode and therefore can't assign her to the chair. She once was assigned, but not any more. Some people have killed her by feeding her addiction, but I can't even do that as she never asks for anything but the chair that is already built and placed right in front of her.
I haven't tried this myself, but you could try to snipe the two of them (and replace them with generic settlers who can be assigned jobs). If you're hidden, maybe the rest of the towns people won't attack. I've read that you can kill one settler with impunity, but two will turn all the villagers against you..
If you're on a PC, you could try console commands like evp or resetai. Or even the more drastic kill, disable and markfordelete.
Eh, Mama Murphey's old and strung out on drugs.
The way I get around this particular issue is Hangman's Alley. I leave Hangman's alley with one guy there, I turn around and there are twelve people trying to live in that alley. That's too many for that little amount of space, you dig? So when Hangman's Alley gets too big, I disperse a few to settlements. Hangman's Alley is sort of like a recruitment center.
For me, she was a hard working settler, I could even trade gear with her, she'd work and go to sleep like the other settlers, then I gave her chems and had her request a chair. Ever since, she sits there all day and doesn't move for anything at all. Jun is one of my settlers that is also stuck on a loop. I have him on guard duty and just moves between towers and occasionally pretends that he's fixing a wall by hammering it hard, but he doesn't go to sleep at all.