Gas mowers are the ONLY way to efficiently and quickly cut grass. However the BEST trimmer I’ve ever used is a DeWalt 20v cordless. I have a LOT of DeWalt cordless tools and they are great. For a trimmer it’s not on ALL the time like a mower...at least for my yard...so the battery time isn’t an issue especially with a 4 or 6 amp hour battery.
So when my riding mower bit the dust a few weeks ago (I knew it was coming LOL), I bought an EGO electric riding mower and like it so far. But my yard and my mother's yard is a good use case for it (it needs recharging when about 2/3rds done with our yards, but I use that time to do the lots of weed trimming anyway and by then the riding mower is charged more than enough to finish mowing). I wouldn't run out and get one without thinking about it and making sure it works for you.
When human labor (or Central American) is involved (jk), yes, but low power robotic slothbots have a completely different sense of time. They don't want to finish, they just want to finish this round then start over, forever. The energy consumption of that approach can be a tiny fraction of the brute force time-is-tacos method.