Is 51 degrees (C) (124 F) too hot for the voltage regulator?

Nope, that is expected. 51C is not very stressful for an electronic component. I only get worried when the temp starts to get above 90C-100C. If 17V is coming in and 5V is going out, all that excess voltage is going to have to be dissipated as heat, and it gets worse as current goes up.

An input voltage closer to 12V will definitely help, as will a properly-mounted heatsink.

--
The MegaRAM shield: add 128 kilobytes of external RAM to your Arduino Mega/Mega2560