Recently, i had to clean up this issue; i've seen it occur; under the following conditions;
a configuration profile is scoped; and active on devices; an employee; deletes the config profile; while it is still scoped to devices; this can lead to this sort of looping error that can even slow down jamf pro, if the number of orphaned APNs, becomes excessive.
The fix is sort of nasty but does work; if oyu create a new config profile, and manually edit the generated URL; to match the ID of the deleted (orphaned profile, and go to the edited URL; your deleted profile will reappear. Save the profile and scope it to nothing;
During the next checkin process, JAMF Pro will clear out the profile and the orphaned commands.
If you can't recall the id= var of the deleted profiles; jamf support can assist after you delete the config profiles.
To avoid this in the future, I usually rename config profiles, i no longer want with del-xxxx and just set the scope to nothing.
Hope that helps,
M
Agreed. It's usually a best practice to unscope and "archive" configuration profiles for a few weeks/months before deleting them. Stops issues like this and saves them for future reference if needed.