You are not the bad guy. Your son is old enough to know right from wrong. He is responsible for his choice to shoplift, and now he has to face the consequences for his actions. Setting up an appointment to see a psychologist was a wise choice. He has consequences from the court, and now he has to deal with those at home as well. You are welcoming him to reality by showing him he cannot steal and expect to get a slap on the wrist.
An electronic grounding sounds appropriate. Everything a teen does these days is electronic, so without that, he will certainly have some free time to think about what he’s done and how to make more positive choices in the future. The first way to start earning his electronics back is by accepting his consequence. Once he appropriately accepts his consequence, you can have him earn time to use his electronics. There does not have to be a set date to get everything back, but more of a gradual earning of time as he shows more appropriate behaviors. He will see that he’s being rewarded for his positive behaviors and realize it’s a privilege to use the computer, etc., and not a necessity.
Continue doing what you are doing because it sounds like you are on the right track. Don’t feel bad; no matter what he says or how you feel, you did not put him in this position. He did.