UTP strongly hints that the -ms macros have the end-of-input trap .em pre-set to a defined macro called .EM, with the implication that if the user wants to affect end-of-input behavior they can append or prepend to this macro rather than messing with .em directly. However groff's s.tmac sets its .em value to a macro of another name (viz., .pg@end-text).
This is probably one place where one can safely bring back compatibility to earlier times. It is not necessary to give up .pg@end-text: .EM could either expand to or be an alias to .pg@end-text. I can't think of any modernizing rationale for groff to give up this convention. FWIW, both Heirloom and neatroff keep the .EM. --d
