So, yeah, apparently my comment comes off a bit more negative than intended, but: absolutely great work, and the improvements make this an actually-very-usable solution for the platform.
catch (EntityNotFoundException) when (upsert)
It's a red-fag bonanza: 'upsert' is not related to the exception at all (so has no place in an exception filter), no exception details are accessed to begin with, and a new record needing to be created on an upsert does not seem to be an exceptional situation at all?