Remote sensor

Hey there! I’ve got an esphome sensor monitoring my solar and battery system in my truck, working well when I’m home and within wifi range. I’d like to get it either remotely connecting back to HA with an IoT sim or phone if nearby or storing values while I’m away from home and updating HA when connected to the internet again. Has anyone had a similar use case? How did you go about getting data back?