To recap: your ‘best’ option was your #3 choice, so you put down a deposit. Then #2 takes you in off the waitlist, so you deposit there and tell #3 that you are withdrawing your SIR. Then you hit the jackpot and get into #1, so you repeat the process of depositing to #1 and telling #2 that you are withdrawing.
Yes, that is how it would work, and yes you would lose 2 deposits, and yes, I am sure that that has happened (at least once anyway) in real life.