Principal–Agent Contracts under the Threat of Insurance