The ability to perform first-principles calculations of electronic and vibrational properties of twodimensional heterostructures in a field-effect setup is crucial for the understanding and design of next-generation devices. We present here an implementation of density functional perturbation theories tailored for the case of two-dimensional heterostructures in field-effect configuration. Key ingredients are the inclusion of a truncated Coulomb interaction in the direction perpendicular to the slab and the possibility of simulating charging of the slab via field-effects. With this implementation we can access total energies, force and stress tensors, the vibrational properties and the electronphonon interaction. We demonstrate the relevance of the method by studying flexural acoustic phonons and their coupling to electrons in graphene doped by field-effect. In particular, we show that while the electron-phonon coupling to those phonons can be significant in neutral graphene, it is strongly screened and negligible in doped graphene, in disagreement with other recent firstprinciples reports. Consequently, the gate-induced coupling with flexural acoustic modes would not be detectable in transport measurements on doped graphene.