i'm not easily scared by a challenge , but this one.. i'd pass.
only remote possibility is see straight away would be a midi clock decoder, basically transforming the midi stream into a pulse every bar or beat. which you could then run through AND gates, against the record and play momentary switches.
that way your 'recording start foot tap' would sync up with the midi clock, provided you tap a little early.
just thinking out loud.
you would probably be messing with the 'hold down' functions of the pedal (like undo/clear) though..
perhaps it's easier to try to find a looper with factory midi capabilities