I am not sure how "bad" 2 cycle string trimmers are. I bought a fairly nice (consumer level) one several years ago, but it has been down for two summers now and I can do without. I have enough tied up in carb adjustment parts and new fuel system parts that I could have just bought a new one, and I am ticked off about that. I just hate to send this thing to the dump, it is less than 7 years old, but it is also not economical to repair.
For the money I spent the fool thing ought to be repairable, but has proven to not be. Likewise I can't really only trim around my raspberries and serviceberries and honeyberries with just a string trimmer, the last couple inches of lawn need to be hand pruned so I don't kill off my fruit bearers.
Last summer I didn't trim anything. This year I have hand trimmed a couple times. The idea of buying a corded electric unit and having to deploy and recover my existing 100' extension cord repeatedly is more or less without luster.
I do agree with
@Ashful that some OPE, especially the handheld stuff, will remain oil powered for the foreseeable future. I can't see parking a largish EV in the forest and then running a heavy and expensive extension cord to drop trees. I like to park my truck far enough away that the truck is not at risk if the tree falls in an unintended direction. Big EV plus very expensive cord plus new saw, not economical for me.
On my lot, 8-10k sqft, a gas trimmer is handy because I can just walk around and put the trimmer away. Mine is just large enough that running a corded electric trimmer is possible, but trimming by hand is more or less a time wash compared to deploying and moving and moving and recovering the 100' cord.
The one thing I will do different on our next property is raise my cordwood kilns up high enough off the ground that I can get my 4 cycle lawnmower deck under the edges and not have to trim them.
With a lot not much bigger than mine a corded electric string trimmer is just not time efficient. I do need to keep the plants down near my firewood stacks so the cordwood is dry enough to burn in time, but I am not otherwise convinced that trimming is really a necessary thing to do.