Power/performance wise, there's no reason an SFF computer shouldn't do the job.
As with any other computer, just be aware of the spec, CPU model number and quantity of ram.
Don't fall in to the "oh, it's i5..that must be good" trap. Be sure of the model number of the CPU and find out where it lies on benchmark charts.
The problems, usually, with small form factor is upgradability. Usually there's no place, or headers, for additional fans,
and no additional PCI-Express slots.
Depending on the model the same may be true for additional internal storage, and memory may be maxed out from the factory.
GPU, if discrete, is going to be low profile so that makes upgrading fairly limited.
These may not be a problem for you but It's good to be aware of these limitations before buying.
Also be aware that sometimes the CPU and case fans aren't detected by common fan control software.
Some manufacturers have their own control software and that's fine. Others don't.
For me that would be worth a google in advance, just to make sure you can set a custom speed curve if needed.
Acer, for example, have their own software but on many models it doesn't let you set a custom speed of below 60%
so it is, more or less, useless.
Cooling is where these machines really fall flat but, and it's a big but, usually home recording isn't putting huge stress on the computer.
Ok, it's possible to use very intense virtual instrument suites or plugins, so take your own workload in to account,
but mostly home recording isn't particularly heavy.
It's usually nowhere close to video editing or gaming, for example.
If you've got fairly modest recording workflow and don't intend to do other heavier tasks, like gaming, video production, etc,
then a 7th/8th gen or younger machine could be just fine.