Mmmmm. Yes, that is definitely a problem. I think the same protections we have against regular citizens coercing the votes of others will still be effective. No letting anyone else see your ballot. No electioneering within X feet of the polling site.
Have the vote be conducted the same way it is in your local town with volunteers setting up a polling station in some room in the prison. Even if the prison really tries to make their prisoners vote for the candidate that is favorable to the prison, they have no way to verify how the prisoners voted. The prisoners can all vote against and then lie when confronted, and there will be no proof either way.
The hard thing to enforce will be making sure people aren’t rewarded or punished simply for the act of voting or not voting. The prison might not know how prisoners voted, but they will know who voted and who did not. They need some kind of monitoring to make sure that there is no special treatment or punishment given to voters or non-voters.
Maybe in the special case of prisons we need some extra measures. Perhaps make it mandatory for all eligible voters go into the booth and cast a ballot, and get instructions to cast a blank one if they don’t want to vote. That way the prison won’t know who voted.
There will also be issues getting people in prison to register to vote. Who knows what that process will look like. I’m sure there will be a very large effort by non-profits to get voter registration forms to prisoners and then get them out to the boards of elections.