Great question — answering as the UphillTech team:
Here’s what I would recommend. Ideally, you should set up a 301 redirect from the second domain to the third one. This will help preserve signals and avoid penalties for duplicate content. If unwanted links to example2.com are really a concern, you can try to disavow them using the Disavow Links tool in Google Search Console. Also, don’t forget to submit a request for a change of address in Google Search Console and use the canonical tag on the third domain to show search engines where the main content is located.
Full answer by Evgeny Yudin: https://webmasters.stackexchange.com/a/145628 (CC BY-SA 4.0).
Need it done for your business? UphillTech.