I'm in the process of replacing the solenoids/seals in my mechatronic unit and wanted to ask if it would be ok to clean the unit (transmission oil/gunk) and the electrical part (TCM?) with brake cleaner?

Any advice?