3yr old won't sleep through the night without me
Welcome to MDC!
That sounds like a frustrating situation. I would encourage you to re-frame your perspective on the situation and try to put yourself in his shoes. He isn't trying to manipulate you by needing you at night. By going to him, you aren't "giving into his demands" - you are meeting his needs. Nighttime can be very scary, and most kids need help going to sleep at night, and also help going back to sleep when they wake up. Putting a lock on the door is counter-productive; he's trying to come to you in the night because he needs you, and preventing that from happening is only going to frighten him and make him feel isolated. Same with crying it out (which, just FYI, is not supported at all on MDC) - it's just going to teach him that you don't meet his needs at night and shut him down. You might get compliance, but at the very high cost of his emotional health.
Try to think outside the conventional box. Maybe you could put a mattress down for you to sleep on in his room, or bring one into your room for him to sleep on. Make is EASIER for him to get to you at night, not harder. Like I said, he's trying to tell you that he needs your comfort at night, he isn't trying to be manipulative or overly demanding. Pull him closer, don't push him away.
It sounds like he just wants and needs to be with you. Instead of working to prevent that, why not shift perspective and just let him sleep with you? In my experience, the harder I've tried to reroute my kids' needs like that, the MORE they seem to pursue them. Giving in won't ruin him or make you a bad parent; to the contrary--it will help him feel more secure in his attachment and I bet you'd all sleep better.