The real solution is to force these kingdoms to build permanently open gates and roadways that connect the land, increase all around traffic and opportunity.
Only when people turn from digital vassals to digital citizens will we emerge from the middle ages we are currently in. In this sense the most important development in the online world is still ahead if us.
I don't think any of these castles were built directly by kings - although I suspect their construction was either approved by a king or by someone who had delegated authority from a king. NB I can also see a large castle about ~11 km away that was a royal castle (and still has a military garrison).
I suspect that most castles are probably in other people's kingdoms.
Castles are thus more like domains where once you take hold of it, even the big powers have a hard time taking it away from you again