In this case it’s very easy to see why their plan was screwed long before it was put into action. I’ve pointed out all the problems but if you think their plan was reasonable that’s certainly your option.They typically put them on the top of the door on the lock side. The door itself has a a rectangular metal plate and the lock is on the jamb https://www.sdcsecurity.com/magnetic-locks.htm
It is easy to see what went wrong after the fact. There are no firearms that are 100% effective. Luck always plays a role in every situation. Good planning tends to minimize the role of luck, but it certainly will never eliminate it.