It is possible but can be expensive, as you have to:
Board loft, at least a walkway.
There has to be loft ladders (cannot use step ladders for access)
There has to be a handrail on ladders and around loft hatch (in loft)
There has to be an ECV on the gas pipe before it enters the loft.
You can use programmable room stats, but to change heating and hot water temperature on the boiler stat - you have to do this at the boiler
My gas boiler is the the loft, installed by previous owner. It is a Ravenheat, which almost every engineer has described as a "B & Q special".
It has proved to be an absolute pain, especially as I am a 62 year old female. Having to haul down the loft ladder (no hand rails on it or round the hatch in the loft) is totally impractical. Engineers hate it.
The Danfoss room thermostat/controller is basic to say the least as well.
I'd like to upgrade to a better boiler, preferably to a more convenient location in the house, but the difference in cost between same location and new location is horrendous.