If you're mainly concerned about the battery, I'd go with the S4 (or any phone with a replaceable battery). Will a particular battery last 2-3 years? As I said, I have a 10 year old battery in my emergency phone right now, and I can still get a couple of days on a charge. (It's a feature phone, of course, they hadn't invented smart phones back then.) And I've seen people complaining that their battery lasted 6 months. It depends on how you care for the battery. If you always squeeze the last bit of juice out of it, only charging it when the phone is about to shut off, 6 months is pretty good. If you charge it when it hits 40%-60%, you should be ready to throw that old phone out - with a good battery in it. (How many people want 10 year old phones? But if mine is down for any reason, I can pop the micro SIM into a full-size adapter, put it into the old phone, and I still have a phone in my pocket.) You use more battery than that every day when you're out? Then get one extra battery and, when the one in the phone is down to 50%, switch them. Charge the one in the phone when you get home. When it's charged, switch again and charge that one. (You can get a battery and charger for about $13. Then you plug the battery cable into one part of the charger and put the other battery into another part of the charger - and they both get charged at the same time.)
There's another consideration with batteries. If a spec (and I'm talking about something too small to feel if it falls into your eye) gets into the battery while it's being made (they're made in rooms that make hospital operating rooms look like garbage dumps), you eventually (in a few months, usually) get what's called a dendrite. The battery runs fine for a few hours, then the phone shuts off. Turn the phone on and the battery is at 92%. Huh? That "dirt" grew a crystal which shorted the battery. The current flowing though the short was enough to destroy the crystal (but not the dirt). And the battery voltage dropped enough to shut the phone off.
I had a few fights with my suppliers, back when I had phone stores, until, if I brought them a graph of the battery voltage going from whatever it was to almost 0 in almost 0 time, then going back up (I had a test setup to cause it to happen and to graph the voltage), they knew to give me a battery without arguing. I just gave my customer a new battery when he brought his phone in - I wasn't going to make him wait until the next time I went to that supplier.
But if it happens with the Z1, just try to get them to replace the battery under the "manufacturing defect" part of the warranty. (The phone manufacturer is responsible for defects manufactured by their suppliers.) It's not going to happen, unless the owner of the store you bought th phone from happens to have worked in battery design (as I had) and understood that the battery was defective.
I don't know about battery prices where you are, but in the US you can get an S4 battery for $11. As far as lag, that depends on which version of Android it's running. If it comes from the factory with Kit Kat (4.4.2), it'll probably run pretty well. If it comes with 4.2 and you OTS update it to 4.3, you may of may not have a little problem here and there. A few (very few) S4 4.3 updates have caused problems. (It's not like the S3. There are very few S3s that have been updated to 4.3 that still work well, or at all - some of them bricked). If you update from 4.3 to 4.42 ... well, the update for my phone has been out for a few days now. I have my update firmware frozen. 4.4.2 takes away too much and gives too little. I consider it about 4.3.2. It's got some nice additions (like a little more battery life and a little more speed), but it's not worth the fact that a lot of apps I use almost daily haven't been upgraded to work with it yet. (And there's no Safestrap for it, which is a deal breaker to me. The ROM I run is actually too fast for one app I run - things happen faster than the blink of n eye and I can't use the app, so I have to reboot to a slower ROM (I just use the stock one) for that app. I couldn't do that on 4.4.2.
(And if you think there are no problems with the Z1, think again. They're just different problems than you have on the S4.) But once the S5 has been out for a week or so (maybe by the beginning of May) you may find S4s new for under $500. That's something to consider. That $40 difference will buy you almost 4 batteries. If you treat them well, people will laugh at you for using such an old phone when the 4th one needs replacing. (Even if they only last 2 years each, including the battery that comes with the phone that's 10 years [5 batteries]. Just for waiting a few weeks.)
Your money, your phone, your choice. People told me I was crazy to buy a phone with a locked bootloader that can't be unlocked (yet). I like the phone. Choose on the basis of what's important to you.