Hey there Patrik,
It seems like you have isolated this to your Mac which does help. Even though the issue appears random, if it is occurring 80% of the time, testing this out in a new user or in safe mode as the previous response suggested, could isolate this even further. Here’s how to test in a new user account:
On your Mac, choose Apple menu > System Settings, then click Users & Groups in the sidebar. (You may need to scroll down.)
Click the Add Account button below the list of users on the right (you may be asked to enter your password.)
Click the New Account pop-up menu, then choose a type of user.
* Administrator: An administrator can add and manage other users, install apps, and change settings. The new user you create when you first set up your Mac is an administrator. Your Mac can have multiple administrators. You can create new ones, and convert standard users to administrators. Don’t set up automatic login for an administrator. If you do, someone could simply restart your Mac and gain access with administrator privileges. To keep your Mac secure, don’t share administrator names and passwords.
* Standard: Standard users are set up by an administrator. Standard users can install apps and change their own settings, but can’t add other users or change other users’ settings.
* Sharing Only: Sharing-only users can access shared files remotely, but can’t log in to the computer or change settings. To give the user permission to access your shared files or screen, you may need to change options in File Sharing, Screen Sharing, or Remote Management settings. See Set up file sharing and Share the screen of another Mac.
For more information about the options for each type of user, click the Help button in the lower-left corner of the dialog.
Enter a full name for the new user. An account name is generated automatically. To use a different account name, enter it now—you can’t change it later.
Enter a password for the user, then enter it again to verify. Enter a password hint to help the user remember their password.
Click Create User.
Depending on the type of user you create, you can also do any of the following:
* For an administrator, select “Allow user to administer this computer.”
* Select “Allow user to reset password using Apple ID.” To use this option, the user must have set up iCloud on this Mac. However, this option isn’t available if FileVault is turned on and set to allow the user to reset their password at startup using their Apple ID.
* Use Sharing settings to specify whether the user can share your files and share your screen.
* For information about Apple’s privacy policy, see the Apple Privacy Policy website.
* If your Mac or Magic Keyboard has Touch ID, a new user can add a fingerprint after logging in to the Mac.
You do mention this occurs on your iPad and iPhone as well. Try signing into your wife's account in the new user on your Mac and see if it works. If it does, sign out and sign into your account and see if the issue appears. This can tell us more about what's going on.
You can read more here:
Add a user or group on Mac
Take care.