What if Shenzhen didn't exist across the river? HK is part of a unique economic environment with significant externalities making it prosperous.
Hong Kong is equal or larger than Austria, Switzerland, Denmark, Finland, and Ireland.
Taiwan is larger than all those, plus the Netherlands, Portugal, Belgium, and many others.
They are richer because of their adoption of free trade.
I think you have this backwards. Milton Friedman was already raving about Hong Kong leading the world back in 1980.
https://www.youtube.com/watch?v=m0dfiWM-rsE https://en.wikipedia.org/wiki/Free_to_Choose
The first special economic zone was created in Shenzhen in 1980, coincidentally. It's population at that time was around 60k according to this link:
https://worldpopulationreview.com/world-cities/shenzhen-popu...
Hong Kong's population was in the millions at that time. The SEZ was created specifically to imitate HK and other successful neighboring economies.