People are not lazy
A friend once said to me "People are not lazy; they are just unmotivated." I find this statement helpful because it shifts one from a blaming attitude "You can't get good help these days!" to a more proactive attitude "What can I do to help X be more engaged/motivated?".
I have been fortunate to lead well paid, skilled professionals so I have rarely met a lazy person at work. My thinking is "If they are lazy how did they finish a university degree and then spend the next 3-5 years honing their craft?" Here are a few approaches I have found worked well for me:
Aligning the work with their drivers/motivations
Getting someone pumped can be about understanding their drivers/interests and then demonstrating to them how the work aligns. They may want to work on cool tech so they can brag to their peers, so look at the task "developing a backup solution" and ask "What would it take to make this backup solution we are doing so interesting you could do a presentation on it at a conference?" Nudging them gently, and clearing the path, so that they can build a high-quality backup solution that is reliable, useful and tested, and that they can proudly brag about to others will probably get people jumping out of bed in the morning.
Painting the bigger picture
There are times where no amount of polishing will make the work shinny. Here one may be able to get the team on board by regularly reiterating and personalising the bigger picture and demonstrating how this work is an essential part of the whole. "To do X and Y, we need first to complete A and B, the better we do A and B the less likely we have to worry about them when we are having fun in X and Y land." Like a good relationship, no matter how cool/interesting a project is there are always boring bits, but if overall the work has meaning for those doing it, then they can conscientiously complete the meh parts because the overall outcome is worth it.
Removing Fear to Make Way for Awesome
Another reason people can settle into a state of inaction is because of fear. They may feel overwhelmed by the work, be scared they will mess up, will somehow break something, will work on something no one will find useful, or be found out as a fraud. One needs to nail down the root cause of the fear and mitigate/help overcome it. It is common for the best engineers to be underconfident; they understand better than most the underlying complexity and what can go wrong.
Being Compassionate Makes Good Business Sense
Life is not limited to the four walls of the office. People have lives outside of work, and things can happen that throw one off their game. A death, divorce or illness can be overwhelming. As a leader, one needs to empathise as much as possible and try and help to the best of their ability. Being considerate is not just the right thing to do but makes good business sense. Giving someone paid time off or more flexible work options so they can to grieve or deal with family matters can build a level loyalty that will be paid back in spades.
Being nice is not the same as being soft
Being nice is about having authority but wielding it responsibly and compassionately. Without perceived power, one can be viewed as just soft and won't inspire loyalty or respect.
"One ought to be both feared and loved, but as it is difficult for the two to go together, it is much safer to be feared than loved, if one of the two has to be wanting" Niccolò Machiavelli, The Prince.
Sometimes one needs to be firm in order to set boundaries and bring someone back into the fold. If someone's behaviour is getting out of line then reiterating expectations and clearly outlining consequences is a good first step before seriously considering termination. One bad apple in the fruit bowl can poison the rest, and the safety and welfare of the team have to outweigh the well-being of the individual.