If you rather switch in Metagross, that is usually going to be the best bet if you find your Machamp suddenly up against something that heavily counters it.
Barring that though, Heavy Slam is actually a fantastic example of an extra move making a Pokemon far better as a generalist option. Against the 5 types that resist fighting, steel is not resisted or is super effective, so adding heavy slam can help fill in all of Machamps potential gaps.
On the TM issue, if you get Close Combat as a second move, you just have to weigh whether or not you want the stardust you spent to be wasted (since CC has nearly no use if you also have Dynamic Punch) or if you want to spend the extra TM.