Use a mains-powered smoke detector so it won’t draw any current from the battery, besides diode leakage (typically).
Use a long life lithium 9V battery.
This combination will easily last the life of the smoke detector - 10 years. Since consumer smoke detectors have to be replaced every 10 years, you’ve got 0 battery replacements and you can’t do any better than that :)
If the alarm is activated rarely, then you can just buy “10 year” detectors that have a built-in primary lithium cell rated to last at least 10 years. No mains power needed. Then you won’t even have to buy the battery separately.
If your smoke detector is over 10 years old, you have to replace it!