TK5 and FM145 or 146, were not "good" transmissions, they weren't terrible just a higher repair rate as they got older.
M5OD-R1 was a good transmission, used from 1988 until end of production in Rangers and Mazda B-series, 2011/12
'88 to '92 2.9l had them but only in 2WD, 2.9l was dropped in '92
'90 to 2012 4.0l had them in 2WD and 4WD, '90-'94 models still had the speedometer cable hook up, that was lost in 1995 with electronic speedometer use.
M5OD-R1HD was used on the 2001 and up 4.0l SOHC engines, same transmission inside, extra bolt hole on the outside, same bolt pattern as 4.0l OHV(1990-2000)