Glad that you got if fixed. It really is appalling to me that vehicles don't come with good on-board diagnostics and meaningful error messages.
I used to work with CNC machines. One brand had excellent error messages that you could generally take to the bank as to what the problem was and that was over 30 years ago. We had another brand (German made) that generally displayed error messages that were totally irrelevant. Trouble shooting was a nightmare. Guess which brand I only bought one of. Unfortunately in vehicles it seems like they are all equally bad.
I can sympathize with your problem. I recently had a problem with my truck that only revealed itself under heavy loads. You generally don't want to take a 16,000lb trailer with you to the mechanic but then the mechanic can't re-create the problem. I had another issue where the code would appear randomly but would clear itself before I could get to a dealer. The dealers refused to work on it without seeing the code for themselves. Both situations clearly call for better on-board diagnostics and that burden shouldn't be on the customer.