The teeny amount of acid that was recommended for the sparging water is an artifact. It's essentially zero and you should treat it as such. There is no need to acidify sparging water that already has low alkalinity (like RO does).
It sounds like it was hectic on brew day with a lot of unanticipated changes. You did what you had to to make it better, but nailing those things down will make your life less hectic. That pH excursion to 5.8 should not have mattered too much, but its good that you brought it down to a more reasonable value.
As you already found, you could not have just added lactic acid and calcium salts to obtain a desirable mash pH with that grist. There was too much acidic grains in there and a bit of alkalinity was necessary for your RO mashing water. There really isn't a better way to better dark beers.