I guess it’s possible a faulty battery might not provide enough capacitance and allow voltage spikes from the alternator to reach the PCM. The alternator isn’t able to keep the voltage regulated properly without the capacitance provided by the battery. But even a failing battery usually provides plenty of capacitance so that doesn’t happen.
High idle rpms can be a tough problem to diagnose. Idle air control, intake manifold air leaks, brake vacuum booster air leaks, etc. I had that problem on my Corolla, turned out to be the idle air control gadget had malfunctioned. Before venturing too far down that path however, make sure the re-learn procedure mentioned above has been done and enough time & miles has passed that it has a chance to take effect. A new computer mated with a new car works fine b/c everything is new; but as the car ages stuff inside the engine starts to clog up a little, and the computer has to adjust the engine parameters to keep it running & idling well. So it still works fine with an old computer matched to an old car. When the computer is replaced then you got an old engine/new computer situation, and it takes some major adjusting for them to get used to each other.