A stronger IR LED or a small IR amplifier module usually does the trick if you need more range. The built-in IR on M5Stack devices is quite limited, so adding an external high-power emitter and driving it with a proper transistor or driver board can noticeably increase distance. Just make sure the angle and alignment are good, because IR range often depends as much on direction as on power.