We used to have swappable batteries in virtually all of portable electronics. You could even get them in a rechargeable accumulator format. Virtually all of portable electronics has integrated batteries.
We might eventually get back there; maybe the EU will do for e.g. hand tool batteries what they have done for phone chargers and mandate an interchangeable standard.
Most modern devices have an integrated 3.7v Lithium battery so standardisation should be possible but I see no market forces for this - devices with short lifespan (limited by a non-replaceable battery) are more profitable.
I don't think the technical difficulties are the problem here.
But please don't exactly match AA/AAA sizes. That will cause much more harm than good.