The workaround for that is simple, and is tactical:
1. Let the enemy build the harbour, and do not attack, until there are some military buildings around
2. Start an expedition and let it wait at the nearest available spot
3. Attack and destroy the harbour
4. Send your expedition to the site, but don't build yet.
5. Once it doesn't block anymore, capture the nearby military buildings with enough forces to fill them
6. Build the harbour
7. As soon as the harbour is ready, send the soldiers in from the surrounding buildings, or if you don't
have the option enabled, destroy some of them.