I know for sure that they actually think a lot, especially our shelter dog can spend days processing something that he perceives that he did wrong, or something that he did not understand. Actually he gets it right in the end quite often!
Likewise our cats process things on a deep level, this has been the most obvious with the two that got hurt (half a paw & a full paw gone), they definitely process what has happened and have gotten closer to us for safety...
The one that died recently was different, a lot to take in when you get your ribs crushed, with your small intestine herniated... Then an overdose (maybe that was the plan of the vet?) and ending up dead in minutes while I was downstairs getting some coffee as an antidote... Maybe better in the end than waiting for weeks to get big enough for a surgery, feels like she knew just that...