Yes, to force compliance they can easily just deny access to electronic cash within a local or a region. They don’t have to take your cash, just deny your access, so then how will you feel about the local political dissidents when you can’t buy a red box movie, hot pocket and 2 liter soda...you’ll be pissed off. (Kidding.)
In such situations, cash, gold, silver, guns, ammo, food or some barterable skill (shoe repair maybe) will quickly be king.
Yes - there will always be bartering and that is very hard to eradicate. In post WW II, the Germans bartered in cigarettes and their few remaining household items. Some of the women even resorted to prostitution to survive (not recommended). But there will always be bartering.