You might consider one of these:
https://lowpowerlab.com/shop/product/133
5V/1.5A Buck Regulator
Murata OKI-78SR-5/1.5-W36-C
instead of the L78M05. Felix at LowPowerLab has a discussion of testing he did on them for his doorbell design. Looks to be more efficient than the L78M05 in the same footprint.