Seems pretty straightforward to run a script from EmulationStation. Proof of concept, here is a crude 10-minute version I made using Hursty's "Bluray" theme. It already contains a "Power" system, so I just added a small script, uploaded a small .png of the DualShock controller and edited the gamelist.xml file.
MAIN MENU (from Hursty):
main menu.png
SELECTION:
selection.png
OUTPUT W/Pause (currently requires a keystroke instead of a button-press, but can modify this):
ps4power-2020.04.14-17.24.46.png
The simple script:
#!/bin/bash
clear
echo PS4 Dual-Shock Battery Level:
cat /sys/class/power_supply/*/capacity
echo
read -p "Press Enter to continue"
Be sure that the script is set as executable.
Lastly, the es_settings.cfg entry for the "Power" menu item to appear:
<system>
<name>power</name>
<fullname>Power Menu</fullname>
<path>/home/pi/RetroPie/roms/power</path>
<extension>.sh .SH</extension>
<command>%ROM%</command>
<platform>linux</platform>
<theme>power</theme>
</system>
Ideally, the output would be prettier and require a DualShock button to be pressed instead of the keyboard Enter key, but this will certainly work.