Earlier quoted context omitted.
From my experience, TCO on most apple products ends up being roughly the same when you factor in resale value. You'll be able to sell your M4 mac mini in 5 years for $150 for an instant-cash offer from backmarket or any other reseller, while you'd be lucky to get $30 for the equivalent Beelink or BOSGAME after 6 months on ebay.
Is there a black market for old macbooks/minis? My macbook pro 15 inch, mid 2017 is valued at $195 by apple trade in. Bought for 2k iirc.
I owned a 2014 MBP (~$1200?) for a long time and as late as 2019 it was resellable for $500.