@konacurrents You wrote "I'm not using RC-5 with my ESP32 M5 controllers" and in the next posting "eg. the IR doesn't turn the TV on"
So do you want to remote control a TV or another device? If you not using RC-5 what alternative protocol does your device use?
For the mentioned test by the mobile phone camera: Test if ANY working remote from TV or HiFi etc... is visible by your mobile phone camera. Point the transmitter to the camera and press a button. If you see a flashing light, then your camera is able to see the IR light.
Now do the same at the M5StickCPlus when one of the examples is running.
If there is no flashing IR then investigate on the port number of the IRLED on your device and change it in the code to the right one. If it flashes but your receiving device is not reacting to it, it may be a wrong protocol or command.
It may help if you post the code you are trying and a description of what exactly you want to control.