When I visited Peru in 2016, I found that credit cards were accepted almost everywhere, but cash was preferred.
Since my trip was a few years ago, there's a chance that more hotels, tourist agencies, and even small shops or street sellers now accept credit cards or online payments through other carriers.
However, I would still recommend taking a few hundred dollars in cash with you. Try to get smaller bills so you can manage your payments more easily.
Having local currency will also help with tips and small transactions.
Most of the advice in the post you mentioned is correct. I would add that exchanging currency at hotels and airports is less convenient (yet, the most secure environment). They usually offer the worst deals. Again, having small bills will help you change just a few dollars and lose the least when you need to get local currency.