I'm glad I stumbled upon this thread and this site. You've compelled me to sign up.
One of my good friends works for the Dominica
maritime registry and from what I've heard it's pretty easy/relatively cheap
to register a yacht under their flag. (Added bonus is their based out of the good old USA)
In regards to your question on port control you just need to always check the national laws/requirements of the country you enter before entry and you shouldn't have a problem. I think people get in trouble when they think they can just sail in like it's their own country.
Being registered with a foreign flag means that your in compliance with the flag states national laws and with the relevant international laws. Different countries will have different entry requirements but don't let that deter you from flying with a foreign flag... theirs a reason they are called "flags of convenience"