My guess was that it happening at the end of the brew cycle is because that’s when excess steam is released, so it is condensing in such a way that it causes a short to ground on the warming element circuit when it switches over.
Then your issue of it working on a different outlet threw a monkey wrench into that. But MAYBE it’s was locational in nature, meaning that in moving the entire coffee maker, to plug it into the other outlet, you have also changed the airflow so that the steam no longer condenses in the same way inside of the unit. Simple experiment would be to use an extension cord (appropriately sized) to operate it back in the original spot but from a different outlet. If it trips again, that would prove it.