Negotiating a deep discount on rent through prepayment can be a wise financial transaction, but you should realise that this transaction is in the nature of an unsecured loan. Anybody can become a landlord. It does not require any special training or skills or even any serious level of financial aptitude. Just because somebody is a landlord, does not mean they are a good credit risk.
Let's suppose the landlord blows your entire prepayment in a week and has no other money to his name. (We'll suppose the mortgage loan secured by the property has a balance that exceeds the value of the property.) If your apartment needs maintenance, the landlord is not going to be able to pay for it because he has no money. You can do the maintenance yourself, but since the landlord has no money, you won't be able to collect damages from him. If you hadn't given the unsecured loan to the landlord, you might have other options, such as leaving the apartment. (Well, you can still do that, but you'll be out your money.)
Similarly, in case of foreclosure of the property, you might be worse off as a result of having prepaid the insolvent landlord, although the details will depend on local law and I decline to research the law of the Philippines for the purpose of this post.
If the landlord is solvent, this transaction may work out without issue, but I hope you at least inquired about the landlord's credit-worthiness before making this loan, perhaps obtaining a credit report on him (if those exist in the Philippines). Landlords often insist on obtaining such reports on prospective tenants and there is every reason to insist on reciprocal disclosure when you are taking on this kind of risk.