QUESTION:- "What does 马 represent?"
In modern mechanics, the "horse" represents "strength / power", thus we have "horsepower", (马力)
The horse in ancient China, however, represents "swiftness / speed" (strength was represented by the Ox, thus we say 牛力)
In the idiom, 马到成功, "到", means more than just the physical arrival of horses, it has the archaic meaning of "the existence / appearance / the essence of..." (remember this idiom was coined by 关汉卿 around the 1300 AD) We therefore also have the phrase 到家, which though literally means to "physically arrive home", also, as a verb, means "to achieve a high level of attainment"
So, "马到", in "马到成功", following its archaic meaning, means to "have the existence / appearance / the essence of horses"; meaning "the achievement of success", (成功), has the innate characteristics of horses, i.e. "speed / swiftness"
So, 马到成功, comes to mean "speedy / swift achievement of success"
QUESTION:- "Why not 马上成功"?
马上 is a compound which means "immediately" which is "faster / speedier" than 马到 which just means quick.
However, 马, (meaning speedy / swift), is still found in 马上, but now combined with the 上, (meaning higher, superior, on top of), it has thus "Up" the ante, as it were, and becomes "immediate"
Yes, it is perfectly grammatical to say 马上成功, (immediately successful), in an appropriate situational context. But it would not be an Idiom anymore, just a normal descriptive phrase.