You probably want to slip some conduit around the wire to protect it from the mortar, patch the hole, then use a surface mount box screwed to the wall with the wire fed in the back.
I have a great idea for a program! I should describe it in agonizing detail to an AI owned by some company so it will spit out working source code. Nothing can go wrong with my plan!