So the situation seems to be, there was a major chain alignment issue but instead of addressing it by adjusting the rear sprocket (rag joint) to fix the alignment he eliminated one rear motor mount stud where the chain was rubbing (or slapping). With only two pairs of studs holding the motor on the bike, the motor wasn't held securely enough by only 3 studs to hold it on the bike, specially with a major chain alignment issue....
Hopefully by now you realize this situation was completely predictable if you just acknowledge the above situation. When you build this time you need to center the motor on the bike, mount it with all 4 studs, and take a look at your chain alignment and adjust the rear sprocket mounting so the chain doesn't dog leg inward from the motor to the rear tire. If you put the new motor on the bike and don't adjust the rear sprocket you will have more trouble. (If I am reading the situation correctly)