Massive data centre investment has underpinned a record leap in spending on new machinery and equipment and could help ward off a recession.