Answered by Borut | Aug. 13, 2023 06:19
No, this is not eligible. The rule is very simple and it says that the immediate points before and after your Chinese destination, in your case Shanghai, have to be in two different countries or eligible territories (Hong Kong, Taiwan and Macau). As you can see, your immediate points are both in the same territory - Hong Kong. Immediate points are all that matters. If you retain this itinerary, you will have to obtain a Chinese transit or tourist visa in advance. I would suggest you to do something like:
Macau - Shanghai - Hong Kong - Phuket
The above itinerary would be eligible for 144 hour visa free transit in wider Shanghai area.