is the ecm the problem if battery light is on and the alternator isn’t bad

battery light is on and the charging system doesn't keep battery charged, alternator replaced as well as battery and no change to problem, the wire from alternator to battery block in engine compartment burns out and any direct wire made from alternator to battery block burns up – do not know if wire was damaged before old alternator was replaced, the actual battery is in wheel well, being told the ecm is culprit, the engine light is not on only the battery light, was told the voltage regulation of system is in the ecm for this year of car

My car has 87000 miles.
My car has an automat

– is the ecm the problem if battery light is on and the alternator isn’t bad