A good way to kill roaches in a washing machine or even drain pipes is to pour some bleach into the washing machine or drain line.
For the washing machine just fill the washing machine tub up all the way using hot water and then pour a few cups of bleach into the washing machine tub.
Run The washing machine through a wash cycle and the bleach should kill off the roaches and then once the wash cycle is done you can vacuum any dead roaches out of the washing machine tub.
Laundry Detergent can also kill roaches so maybe add both bleach and laundry detergent together and add some Borax Powder along with it to be most effective.