The 335i, like many other cars, has a "drive by wire" accelerator assembly. The pedal travel is regulated by a solenoid which has a built-in position sensor to send pedal position to the throttle body assembly on the engine.
If it's only happened once and the dealer won't (or can't) reproduce the problem, then you should probably wait until it happens again and return the car to the dealer.
Another possibility is that you misjudged the perceived pedal resistance (that it was fine) and that the car simply suffered some kind of fault and went into what's called "limp home mode", where engine output is reduced. If that's the case, the issue has nothing to do with your accelerator pedal and is more likely related to an issue with fuel the fuel injection system or one of the various sensors that controls ignition timing.
I've only owned one BMW, it was a long time ago and one of the reasons I won't own another is because all my friends who do own them have never had good things to say about their dealer service network. Try another dealer, if it's even remotely convenient.