Don’t feel like an idiot OP, you did nothing wrong and you got out alive and unhurt so you managed the situation well, perfect result. Money means nothing, forget it.
Had something kind of similar, when I was late 20’s or so (20 years ago) flat in Torry, Aberdeen. Girl took money and left room, some bloke came in and asked me to leave, when I said no he pretended that he knew martial arts and came at me. Sadly for him he met someone who had practiced a form of martial arts since the age of 12-13 and the situation was soon resolved in my favour, I also got my money back but sadly had to face a screaming escort in my face.
There are ways to deal with someone attacking you with a baseball bat, it involves you having to go against your instincts and not back away, but instead lunge with your arms/hands towards his elbows as he swings, and from there you have to go with the flow somewhat but I appreciate and respect that most folks just want to get the fuck away. Facing two clowns with bats would make even me think twice though, but I think I’d still stand and face them head on though.
One thing I’ve always done, is to never get undressed when the escort leaves with the money, and instead be very still and listen for any noises in the flat instead, always be prepared. Even when she comes back, I keep clothes on for a good few minutes, don’t want to fight any idiot with my tackle hanging out!
100% if the flat is a mess and shit then I walk, no problem doing that, done it at least 2 or 3 times now.
You have my sympathies OP, but you did really well to get out unhurt, you deserve praise instead of feeling mugged off.