'On' is a male person, a living thing, isn't it? So a "samochód" can only be "To", because it is not a person, it is only an... it.
No.
On can refer to any noun of the
masculine gender, living or non-living.
To refers to a noun of the
neutral gender. To has nothing to do with masculine gender.
Samochód is a
masculine gender noun, so use
on, and acc. of on is jego as you know.