Oh yes, I've had many problems with neighbors and homeowner associations/police, but only in the case of reproducing recorded music. And, no, it wasn't Metal Machine Music or Laibach...just mainstream jazz or orchestral music. Certainly no louder than various hell-beasts yapping and snarling or the many drunken conversations I've been submitted to as an auditor.
I also use a digital piano, as well as an amplified Hammond-Suzuki and the Rhodes piano at home: nobody has ever complained, in several cities, and many more apartments, where I'm absolutely sure the neighbors could hear me practicing or just playing on at least the stage piano through a PA speaker.
In my experience, neighbors hate electric guitar, but they hear classical piano or jazz/blues/country piano and give it a pass. "Awww! Isn't that precious! My grandmother used to play like that, may she rest in peace!"
The acoustic piano would be a bit different, though: the sound of the mechanical action, the lack of a hard limit to volume (well, beyond how loud you're physically playing).
However, I'd bet you anything you can find a book or document relevant to your particular city/municipality/nation with a title like "Landlords for Dummies" or something: there may well be accomodations made, as in NYC, for professional musicians to pursue their livelihood within their domiciles.
In my experience it's difficult (in the US) to decide exactly how the law treats civil potential violations: lots of footnotes. IME it's a lot of discretion on the part of the sheriff or police agent, and I've had success going up against the judge....but that's unpleasant.
Personally, I wouldn't say anything to your landlord. Just treat it as something you do, and let them figure it out.
I'm not saying play Stockhausen or Stravinsky at maximum volume, but I'm guessing your students are going to be playing things much more subdued.
I don't even think it's a risky gamble: just do it, and if your students get out of hand with the fff, rap their knuckles with a ruler, or just reduce the volume.
You can as well use a limiter/compressor on the digital device to ensure things don't get out of hand.
And, if it comes down to a battle, a little dB meter is not expensive and you can document how loud your sessions actually are.