Is it correct that if Contact-1 opted out '0001', then that number is also opted-out for Contact-2
Yes, that's indeed the case as SMS subscriptions are not bound to the Contact, but to the phone numbers. You can see this relationship in Contact Builder:
You can easily test this case using the interface:
- import two contacts with the same phone number
- change the subscription status on one of the contacts and see how it changes on the other one
As for the second part of the question:
and then '0004' will become Priority 1 for Contact-2?
Priorities won't change automatically, but you can import Contact 2 with phone number 0004 in a Import Definition created in Contact Builder (import to List, Destination List: All Contacts - Mobile
). This will make phone 0004 have Priority 1 again.
Please just be aware that it's kind of an extreme step and you need to make sure this should really be done. After all if your phone contract expires, the carrier could assign this phone number to a different customer in the future. In those situation you just can't fall back on those older phones as they could belong to other people at the time of sends.
Even if the phone number didn't switch it's owner, imagine the situation:
you change your phone number,
inform a company about that change,
opt out of SMS on the new phone
start getting SMS on your old number
That's just bad customer experience.