An alternate fix for emphasis:
Require an exact match between the opening and closing delimiters. Kind of like inline code spans.
Emphasis would begin with a left-flanking delimiter run of exactly 1, 2, or 3 asterisks or 1, 2, or 3 underscores, and end with a right-flanking delimiter run of exactly the same length and character.
*emphasis*
_emphasis_
**strong emphasis**
__strong emphasis__
***strong plus regular emphasis***
___strong plus regular emphasis___
Four or more sequential asterisks or underscores would render literally.
****no emphasis****
____no emphasis____
Unmatched delimiter runs would not create emphasis at all, and could not divide into emphasis plus literal characters.
**no emphasis*
**no emphasis***
_no emphasis*
Any unmatched delimiters, including within emphasis, would render literally.
**asterisk* within strong emphasis**
__underscore_ within strong emphasis__
*asterisks** within emphasis*
_underscores__ within emphasis_
To create a literal asterisk or underscore next to emphasized text, a character can be escaped…
*asterisk\** inside emphasized text
*asterisk*\* outside emphasized text
…or a different delimiter character can be used.
_asterisk*_ inside emphasized text
_asterisk_* outside emphasized text
Nested emphasis would work.
**strong and *emphasis* within strong**
It would also be possible to nest the same type of emphasis by alternating asterisks and underscores.
*lots _of *emphasized* text_ here*
When using asterisks in a single word, emphasis would start with a left-flanking or both-flanking delimiter run, and end with a both-flanking or right-flanking delimiter run. This would allow intraword emphasis.
*emphasized*
*em*phasized
em*pha*sized
empha*sized*
These rules should be pretty intuitive and easy to learn, and backwards compatible to a large extent.
And they eliminate a huge amount of complexity and ambiguity.