Yes cockroaches do fart just like humans and other animals do.
Although cockroaches fart it's not usually noticeable like a human fart is.
A cockroach farts quite a lot and farts more than their body weight.
The average cockroach farts and will produce 35 gm of methane gas a year, which is about 45 times their body weight.
If you have cockroaches in your house or have been around cockroaches they likely have farted a lot around you but you never really noticed.
But with humans the farts are noticeable and pretty stinky.