Sorry to hear of your car problems but... I think your Hyundai dealer was in error!!. You car was still licensed in the USA, (I assume), and thus you were simply tourists in Canada and the warranty should have applied unless Hyundai has a different policy to most other manufacturers.
When the manufacturers or Canadian dealerships deny warranties on USA cars it is usually because the car was purchased new and IMPORTED into Canada, which you did not do!! This practice has been around for several years now in order to try and discourage Canadians from buying and importing much cheaper NEW cars into Canada. As an aside, this practice does not USUALLY apply to used cars, nor should it apply to tourists.
RV dealers have tried to do the same thing but they base their arguments on the USA RV's not meeting Canadian standards such as CSA or electrical stuff. RV's built for import into Canada are built side by side with their US counterparts but they do sport a CSA sticker. (There are very few actually built here)
They fly into the US about 6 times a year, sometimes with only a couple of weeks between leaving and entering and never have any problems with their visas at the incoming desks...
Although I am not familiar with the terms of a Brit Visa to enter the USA, they are likely allowed to accumulate up to 180 or so days in a given year, similar to Canadians (who do not require a formal paper visa). I think the time in country simply accumulates and as long as the total does not exceed that 180 days they are ok.
As you said, it all depends on the agent you meet on entering or crossing back into the USA. But you were very close with only 2 days left, gone less than 30 days (without planning a longer stay in Canada) etc and you would have probably been out of luck in trying to enter Alaska, even without all the trials and tribulations of the car incident. But all is well that ends well, and they treated you very well in granting you that extension!!!
Have a good trip and enjoy both our beautiful countries