I've seen traps (15 yrs ago) where the kitchen sink waste pipe goes down the inside of the wall into a pipe integral with the gully. However these were specially designed items and had the trap part outside with the usual square grill so that u bend could be cleared. Tried to see if anything like this is on web but haven't located it as such yet.
Do you have a 5-6 inch approx square grille just outside the wall opposite to where the 4" pipe is inside.
Do you have a 5-6 inch approx square grille just outside the wall opposite to where the 4" pipe is inside.