It’s just a 40 minute hop. No real need for a toilet. Chances are the fasten seatbelt will be of for only 15 minutes anyway.
Have not been on a UK train for quite a while, but in NL there are local trains without toilet even though they can be en-route for and hour and a half easily. Makes a 40 minute hop not too bad. Or try to take the Picadilly line from LHR to Cockfosters, that’s quite a drive without toilets too!