When I pin a file on my IPNS Desktop it should first check if port 4001 is unblocked

If you have the right flags set IPFS will do that. (even without you pinning), and start using other nodes as relay to fix the issue of you not being reachable (it’s the goal of the autonat service in IPFS, it will ask other node to call you back, and if they can’t it will attempt setting up a relay).

I think you only need to enable the Swarm.EnableAutoRelay (set it to true) key in the config.