Absolutely. Here are a couple examples of software libraries that I wrote nearly 15 years ago that are still in use by lots of people and haven't needed any form of maintenance since then:
https://www.fairtutor.com/fairlylocal/
https://www.fairtutor.com/fairlycertain/
Step one is to recognize when it's feature complete and bug free, and then stop messing with it. But the most important thing in keeping something finished is to not let anybody else unfinish it. As in, ruthlessly weed out any dependencies that make breaking changes.
Sadly, most breaking changes come from developers who like to monkey with things for no reason, because they have a project and can't help themselves from working on it after it serves its initial purpose. Find these early and either rewrite them or make sure they don't have security issues then stop updating them.
The one thing you can't control is if you have to depend on a big 3rd party service. For my 2 main rent paying products, the only changes I've had to make in the nearly 10 years that they've both been "done" has been to bump versions of things for AWS, Twilio, Stripe, etc. when they changed the API for something that worked perfectly fine previously. Sometimes these rewrites are pretty invasive and time consuming. Reduce these dependencies as much as you can.
The best way of doing that is to run your own stuff on your own servers. AWS can and will (and often do) force you redeploy your shipped .NET Core 1.0 lambdas as .Net Core 1.1, 6 months after that version becomes available. Then they'll force you to redeploy as 2.0 a year later. Then 2.1 the next. On the other hand, your server can still be running 1.0 today if it makes sense to do so (such as for something like a Lambda function that's not exposed to the outside world). The sooner you put in the work to spot that you're on that train and get yourself off it, the better.
It's all doable.