Right now this is collected daily, regardless of political situation. This is unrealistic.
The suggestion is a penalty of reduced income when there is no rightful King or when there has been a recent switch of hands.
Ie:
Rightful King: 100% of NPC tax income
No rightful King: A penalty of 25% to simulate transitions turmoil.
However, we also need a reduce in times the port changes hands. Here we can introduce the concept of Traditional Port controller. This will simulate the populations hostility over a takeover.
Traditional Owner can look back for as many days as we set. We can use 365 or 180 or 30 or at least 7. The call is yours. I would prefer a long enough period (like 30 days). The penalty on tax income will be relative to the period you choose. For example, for 7 days, it should start at 70%, reduced by 10% per day. If you choose 30 days, the initial penalty should be 30%, reduced by 1% per day.
Here is an example on how it will work, taking in mind multiple ownerships:
In case of 7 days: The system will check the owner of the port in the last 7 days. If the nation held the port 5 out of 7, a penalty of 20% will be imposed.
Or if the port has just fallen at the hands of a nation, the nation has had it 0 days in the last 7 days, so a penalty of 70% will be imposed. At day 2 it will be 60%, etc.