Wow. Both of these things happen to me all the time, and somehow exactly as you’ve described.
It won’t be just one space that’s been replaced with “.”s but several in a row.
The trailing “m” is something I often hit as I do the double “ “ to get the “.” and then backspace over the final space but often hit the “m” and tap “send”/“submit” without reviewing.
Speaking of which, it would be nice if it could trim the last trailing “ “ when leaving focus of the text entry if it had been entered due to a doubled “ “ to obtain a “.”.