Yes, very doable with Keyboard Maestro and an AppleScript. Here is a portion of a macro I use to track battery levels on several devices.
To make it work with your device, make sure to adjust the following line:
set trackpadName to "Trackpad"
Simply put in the name of your Trackpad in the quotations mark where I have simply "Trackpad".
In my full macro, I also have it sent me notifications via Pushover to my phone when my devices drop below 20%, as well as updating my Stream Deck every 15 minutes with their percentages.
Note that I am currently running Big Sur, but this was the same AppleScript I used on Catalina too, so if you're on either one of those OS it should work for you. If it doesn't work for some reason, please let me know and I (or more than likely somebody WAY more knowledgeable in AppleScript than me) can figure out something that will work for you.
EDIT: Just realized that two of my notifications can be combined for simplicity. Right now the notifications for below 20% and below 10% do the same thing...because in my full macro below 20% just gives me a notification on my local machine, whereas below 10% also gives me a Pushover notification. Since not everybody uses Pushover I removed that action to upload it here without realizing it made the two separate portions of the macro redundant. Here's an updated one without the extra notification section
Check Bluetooth Devices Battery Levels (for export).kmmacros (8.4 KB)