It seems as I run into a common issue with my Raspberry 4. After an indeterministic uptime, the wifi stops working.
And here is the hotfix, a small script provided by @pitto first restarting the nic and if anything fails just reboots the device:
This bash script checks for wireless internet connection and, if it is failing, tries to fix it.
It is simple and it seems to work.
I just have to write some automation to roll it out automatically including a corresponding cron job once I find some time.
GitHub Repo: https://github.com/ltpitt/bash-network-repair-automation